Skip to content
Snippets Groups Projects
Commit 5178f075 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding projection and keyword list info to output of the filter

parent ef7eb571
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,6 @@ template <class TDEMImage>
void DEMToImageGenerator<TDEMImage>
::GenerateOutputInformation()
{
DEMImageType *output;
output = this->GetOutput(0);
......@@ -80,6 +79,20 @@ void DEMToImageGenerator<TDEMImage>
output->SetLargestPossibleRegion(largestPossibleRegion);
output->SetSpacing(m_OutputSpacing);
output->SetOrigin(m_OutputOrigin);
// Get the Output MetaData Dictionary
itk::MetaDataDictionary& dict = output->GetMetaDataDictionary();
// Encapsulate the metadata set by the user
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey,
m_Transform->GetInputProjectionRef());
if (this->GetOutputKeywordList().GetSize() > 0)
{
itk::EncapsulateMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey,
m_Transform->GetInputKeywordList());
}
}
// InstanciateTransform method
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment