<DIV>Hi,everyone,</DIV>
<DIV>     I'm using ITK to read CTA image(it's a kind of dicom image),and when it runs to the update ,the following error happens:</DIV>
<DIV><!--StartFragment -->
<DIV><!--StartFragment -->
<DIV> in command line:Assertion failed:pixeltype_debug==pixeltype.  file..\..\..\..\..\InsightToolkit-4.4.0\Modules\IO\GDCM\src\itkGDCMImageIO.cxx,line 287</DIV>
<DIV> </DIV>
<DIV>in a window:</DIV>
<DIV>Debug Error!</DIV>
<DIV>Program:F:\..\..\..\helloworld7.exe</DIV>
<DIV>R6010</DIV>
<DIV>-abort() has been called</DIV>
<DIV>(Press Retry to debug the application)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>My code is as follows:</DIV>
<DIV>#include"itkImage.h"<BR>#include"itkImageFileReader.h"<BR>#include"itkImageToVTKImageFilter.h"<BR>#include<itkGDCMImageIO.h><BR>#include"vtkImageViewer.h"<BR>#include"vtkRenderWindowInteractor.h"<BR>#include"vtkSmartPointer.h"<BR>#include"vtkImageFlip.h"<BR>#include"vtkRenderer.h"<BR>#include"vtkImageActor.h"<BR>#include"vtkCamera.h"<BR>#include"vtkImageMapper.h"</DIV>
<DIV>using namespace std;</DIV>
<DIV>int main()<BR>{</DIV>
<DIV> typedef itk::Image<unsigned char,2> ImageType;<BR> typedef itk::ImageFileReader<ImageType> ReaderType;  <BR> ReaderType::Pointer reader=ReaderType::New();</DIV>
<DIV> //获得DICOM文件读取对象<BR> typedef itk::GDCMImageIO ImageIOType;<BR> ImageIOType::Pointer gdcmImageIO=ImageIOType::New();</DIV>
<DIV> //Filter of itk image data to vtk image data;<BR> typedef itk::ImageToVTKImageFilter<ImageType> FilterType;<BR> FilterType::Pointer connector=FilterType::New();</DIV>
<DIV> //获得DICOM文件名并读取DICOM文件;<BR> char*DICOMName="F://c++projects//helloworld6//1.3.12.2.1107.5.1.4.60540.30000013102023122056200010862";<BR> reader->SetFileName(DICOMName);<BR> reader->SetImageIO(gdcmImageIO);</DIV>
<DIV> cout<<"done0"<<endl;<BR> //ITK到VTK转化      <BR> connector->SetInput(reader->GetOutput());<BR> cout<<"done1"<<endl;<BR> <STRONG>connector->Update();//This is the place where error occurs!</STRONG><BR> cout<<"done2"<<endl;</DIV>
<DIV> vtkSmartPointer<vtkImageFlip>flip=vtkSmartPointer<vtkImageFlip>::New();<BR> //vtkSmartPointer<vtkImageMapper><BR> flip->SetInput(connector->GetOutput());<BR> flip->SetFilteredAxis(1);<BR> //需要进行上下翻转才能正确显示;<BR> flip->Update();</DIV>
<DIV><BR> vtkSmartPointer<vtkImageActor>actor=vtkSmartPointer<vtkImageActor>::New();<BR> actor->SetInput(flip->GetOutput());<BR> actor->InterpolateOff();</DIV>
<DIV> vtkSmartPointer<vtkRenderer>renderer=vtkSmartPointer<vtkRenderer>::New();<BR> renderer->AddActor(actor);</DIV>
<DIV><BR> vtkSmartPointer<vtkRenderWindow>renderWindow=vtkSmartPointer<vtkRenderWindow>::New();<BR> renderWindow->AddRenderer(renderer);</DIV>
<DIV> vtkRenderWindowInteractor*iren=vtkRenderWindowInteractor::New();</DIV>
<DIV> iren->SetRenderWindow(renderWindow);<BR> iren->Initialize();<BR> iren->Start();</DIV>
<DIV> return 0;<BR>}</DIV>
<DIV>If anyone know how to fix this, could you please just help me?</DIV>
<DIV>Thanks a lot.</DIV>
<DIV>                                                                                                                                        Guirong Liu</DIV>
<DIV> </DIV></DIV></DIV>