<DIV>Hi,everyone</DIV>
<DIV>    I'm just starting using itk to read dicom image.I wrote a simple program and when it runs to reader->update(),it occurs the following failure:</DIV>
<DIV>assertion failed:pixeltype_debug==pixeltype,file F:\I_VTK\ITK\InsightToolkit-4.7.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line 230</DIV>
<DIV>and then the program would be aborted.</DIV>
<DIV> </DIV>
<DIV>I determine the place where this error occurs.It is because that the member(BitsAllocated) of pixeltype_debug is different from the member(BitsAllocated) of pixeltype.</DIV>
<DIV> </DIV>
<DIV>1)gdcm::Image & image = reader.GetImage();</DIV>
<DIV> gdcm::PixelFormat pixeltype_debug = image.GetPixelFormat();</DIV>
<DIV> </DIV>
<DIV>the BitsAllocated of pixeltype_debug is 12.</DIV>
<DIV> </DIV>
<DIV> 2) <FONT color=#ff0000>if ( !image.GetBuffer( (char*)pointer ) )<BR>    {<BR>    itkExceptionMacro(<< "Failed to get the buffer!");<BR>    }</FONT></DIV>
<DIV><BR> const gdcm::PixelFormat & pixeltype = image.GetPixelFormat();</DIV>
<DIV> </DIV>
<DIV>the BitsAllocated of pixeltype is 16.it changes in the code in red above.And I can't solve it.</DIV>
<DIV> </DIV>
<DIV>Could you please help me?</DIV>
<DIV> </DIV>
<DIV>thanks.</DIV>
<DIV>                                                                                        Liu Guirong</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>