Commit 9f878e40 authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Remove calls to KeywordList related methods

parent b053dc83
Pipeline #5672 failed with stages
in 94 minutes and 57 seconds
......@@ -565,7 +565,7 @@ private:
// Set the output projection Ref
m_ResampleFilter->SetInputProjectionRef(inImage->GetProjectionRef());
m_ResampleFilter->SetInputKeywordList(inImage->GetImageKeywordlist());
m_ResampleFilter->SetInputImageMetadata(inImage->GetImageMetadata());
m_ResampleFilter->SetOutputProjectionRef(m_OutputProjectionRef);
// Check size
......
......@@ -242,11 +242,11 @@ private:
}
m_Resampler->SetDisplacementFieldSpacing(defSpacing);
// Setup transform through projRef and Keywordlist
m_Resampler->SetInputKeywordList(movingImage->GetImageKeywordlist());
// Setup transform through projRef and ImageMetadata
m_Resampler->SetInputImageMetadata(movingImage->GetImageMetadata());
m_Resampler->SetInputProjectionRef(movingImage->GetProjectionRef());
m_Resampler->SetOutputKeywordList(refImage->GetImageKeywordlist());
m_Resampler->SetOutputImageMetadata(refImage->GetImageMetadata());
m_Resampler->SetOutputProjectionRef(refImage->GetProjectionRef());
m_Resampler->SetInput(movingImage);
......
......@@ -167,30 +167,15 @@ public:
return m_Transform->GetInputProjectionRef();
}
/** Set/Get Input Keywordlist
* \depricated
*/
void SetInputKeywordList(const ImageKeywordlist& kwl)
{
}
const ImageKeywordlist GetInputKeywordList()
{
}
/** Set/Get output Keywordlist
* \depricated
/** Set/Get Input ImageMetadata
*/
void SetOutputKeywordList(const ImageKeywordlist& kwl)
{
}
const ImageKeywordlist GetOutputKeywordList()
void SetInputImageMetadata(ImageMetadata* imd)
{
m_Transform->SetOutputImageMetadata(imd);
this->Modified();
}
/** Set/Get Input ImageMetadata
*/
void SetInputImageMetadata(ImageMetadata* imd)
void SetInputImageMetadata(ImageMetadata imd)
{
m_Transform->SetOutputImageMetadata(imd);
this->Modified();
......@@ -209,6 +194,12 @@ public:
this->Modified();
}
void SetOutputImageMetadata(ImageMetadata imd)
{
m_Transform->SetInputImageMetadata(imd);
this->Modified();
}
const ImageMetadata* GetOutputImageMetadata()
{
return m_Transform->GetInputImageMetadata();
......
......@@ -100,13 +100,8 @@ void GenericRSResampleImageFilter<TInputImage, TOutputImage>::GenerateOutputInfo
m_Resampler->UpdateOutputInformation();
this->GraftOutput(m_Resampler->GetOutput());
// Encapsulate output projRef and keywordlist
itk::MetaDataDictionary& dict = this->GetOutput()->GetMetaDataDictionary();
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, this->GetOutputProjectionRef());
if (this->GetOutputKeywordList().GetSize() > 0)
{
itk::EncapsulateMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, this->GetOutputKeywordList());
}
// Encapsulate output projRef
this->GetOutput()->m_Imd.Add(MDGeom::ProjectionProj, this->GetOutputProjectionRef());
}
/**
......@@ -125,9 +120,8 @@ void GenericRSResampleImageFilter<TInputImage, TOutputImage>::EstimateOutputRpcM
tempPtr->SetRegions(region);
// Encapsulate the output metadata in the temp image
tempPtr->SetImageMetadata(*(this->GetOutputImageMetadata()));
tempPtr->m_Imd.Add(MDGeom::ProjectionProj, this->GetOutputProjectionRef());
ImageMetadata* imd = const_cast<ImageMetadata*>(this->GetOutputImageMetadata());
tempPtr->m_Imd.Merge(*imd);
// Estimate the rpc model from the temp image
m_OutputRpcEstimator->SetInput(tempPtr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment