[Insight-users] Problem VectorImage reader
Karthik Krishnan
Karthik.Krishnan at kitware.com
Mon Mar 6 09:01:46 EST 2006
On Mon, 2006-03-06 at 11:21 +0100, Dr. Uwe Köhler wrote:
> Hi there,
>
> we are using itkVectorImages and came accross the following problem:
> when storing an interger valued itkVectorImage to disk and reading it back as
> a float itkVectorImage the contained numbers are wrong.
> However, all the reader does is:
> if( strcmp( this->GetOutput()->GetNameOfClass(), "VectorImage" ) == 0 ) \
> { \
> memcpy( outputData, inputData, numberOfPixels *
> m_ImageIO->GetNumberOfComponents() * sizeof( type ) ); \
> } \
>
> Could that be the problem?
It was fixed in CVS a while ago. The code in CVS reads as below instead
of what you have. Please update Code/IO and you shouldn't have this
issue.
if( strcmp( this->GetOutput()->GetNameOfClass(), "VectorImage" ) ==
0 ) \
{ \
ConvertPixelBuffer< \
type, \
OutputImagePixelType, \
ConvertPixelTraits \
> \
::ConvertVectorImage( \
static_cast<type*>(inputData), \
m_ImageIO->GetNumberOfComponents(), \
outputData, \
numberOfPixels); \
} \
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkImageFileReader.txx?annotate=1.67&root=Insight
Thanks
-karthik
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list