Commit 2cbaeb37 authored by Julien Michel's avatar Julien Michel
Browse files

Correction bug metadata.

parent 1a31f3f6
......@@ -178,6 +178,9 @@ protected:
Image();
virtual ~Image(){};
/// Copy metadata from a DataObject
virtual void CopyInformation(const itk::DataObject *);
private:
Image(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
......
......@@ -128,6 +128,15 @@ ImageBase::VectorType Image<TPixel, VImageDimension, foo>::GetLowerRightCorner(
return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension, unsigned int foo>
void
Image<TPixel, VImageDimension, foo>
::CopyInformation(const itk::DataObject * data)
{
Superclass::CopyInformation(data);
this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
}
template <class TPixel, unsigned int VImageDimension, unsigned int foo>
void
Image<TPixel, VImageDimension, foo>::PrintSelf(std::ostream& os, itk::Indent indent) const
......
......@@ -530,10 +530,7 @@ StreamingImageFileWriter<TInputImage>
}
m_ImageIO->SetUseCompression(m_UseCompression);
if( m_UseInputMetaDataDictionary )
{
m_ImageIO->SetMetaDataDictionary(outputPtr->GetMetaDataDictionary());
}
m_ImageIO->SetMetaDataDictionary(inputPtr->GetMetaDataDictionary());
/** Create Image file */
......
......@@ -144,6 +144,9 @@ public:
virtual VectorType GetUpperRightCorner( void );
virtual VectorType GetLowerLeftCorner( void );
virtual VectorType GetLowerRightCorner( void );
/// Copy metadata from a DataObject
virtual void CopyInformation(const itk::DataObject *);
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -129,6 +129,15 @@ ImageBase::VectorType VectorImage<TPixel, VImageDimension, foo>::GetLowerRightCo
return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
}
template <class TPixel, unsigned int VImageDimension, unsigned int foo>
void
VectorImage<TPixel, VImageDimension, foo>
::CopyInformation(const itk::DataObject * data)
{
Superclass::CopyInformation(data);
this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
}
template <class TPixel, unsigned int VImageDimension, unsigned int foo>
void
VectorImage<TPixel, VImageDimension, foo>::PrintSelf(std::ostream& os, itk::Indent indent) const
......
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