[Insight-users] DICOM : ITK or VTK
garufa7000 at hotmail.com
Mon Mar 13 06:48:12 EST 2006
Hello,i'm vtkuser too and I've exactly the same problem.I read Dicom files
of a CT study using ITK and I convert them to VTK with the same classes that
Frank ( you can see that fragment code below). I don´t understand what the
solution is,Do I have to convert them to png files with DicomImageReadWrite?
I've observed that if I read them like images of signed short type there's
no problem and I can see them whit the correct gray map but if I read them
like images of unsigned short type (and that's what I need) I see them with
the inverted gray map as Frank does. The code I use is:
typedef itk::Image<unsigned short,2> ImageType; //if I use here signed short
there's no problem.
typedef itk::ImageFileReader<ImageType> ReaderType;
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
ReaderType::Pointer reader= ReaderType::New();
ConnectorType::Pointer connector= ConnectorType::New();
connector->SetInput( reader->GetOutput() );
Could you help me?I don't understan what have you done to correct it?
Thank you very much.
>From: Mathieu Malaterre <mathieu.malaterre at kitware.com>
>To: gao at mdimaging.com
>CC: insight-users at itk.org
>Subject: Re: [Insight-users] DICOM : ITK or VTK
>Date: Fri, 10 Mar 2006 17:17:10 -0500
> Thanks for tending the image, it makes testing much easier.
> Without any change I ran the DicomImageReadWrite.cxx example, like this:
>$ ./bin/DicomImageReadWrite IM-0001-0052.dcm my.dcm my.png my2.dcm
> Looking at the file my.png I don't anything odd with it. Could you confirm
>Frank Gao wrote:
>>Attached please find the source code, the picture in pic.doc, and the
>>file I used.
>>I am using VTK 5.0, ITK 2.4.0.
>>By the way, I went to ITK download web page, filled in all the data, but
>>could never get out of the page to start downloading.
>>From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
>>Sent: Thursday, March 09, 2006 5:34 AM
>>To: gao at mdimaging.com
>>Cc: insight-users at itk.org
>>Subject: Re: [Insight-users] DICOM : ITK or VTK
>> Do you have permission to share this image ? If so could you send
>>me ? That'd be the easiest way.
>> If not, could you send us a dump of the header using
>>'DicomImageReadPrintTags' (you can find it in the Examples/IO dir). And
>>parallel to that send us how you instanciate the itk::Image.
>>Frank Gao wrote:
>>>Can anyone please help with this?
>>>First, I use VTK to load 2D DICOM file and display it. Everything is
>>>Then I try to read 2D DICOM file with itkImageFileReader, and then use
>>>itkImageTOVTKImagefilter to load the data into VTK and display it. I got
>>>a picture with inverted gray maps (black turns into white).
>>>Is there any option in either ITK or VTK side to correct this? Do I have
>>>to use any filter to reverse the picture?
>>>Your help is really appreciated.
>>>Insight-users mailing list
>>>Insight-users at itk.org
>Insight-users mailing list
>Insight-users at itk.org
Dale rienda suelta a tu tiempo libre. Mil ideas para exprimir tu ocio con
MSN Entretenimiento. http://entretenimiento.msn.es/
More information about the Insight-users