[vtkusers] connecting vtkKWImage & vtkKWImageIO to itkFilters

Sergio Aguirre sergio.aguirre at gmail.com
Fri Mar 20 12:33:09 EDT 2009


Bryn

Thank you for the response. Yes the vtkKWImage can read a DICOM series, let
me try the 'SetITKImageBase' part which I have not tested.

Also, the seed picker code is great, that is my next part to code.

Thank you, I will update on the SetITKImageBase

Sergio

On Fri, Mar 20, 2009 at 12:51 AM, Bryn Lloyd <blloyd at vision.ee.ethz.ch>wrote:

> Hello Sergio,
>
>
> The vtkKWImage and vtkKWImageIO classes are mainly useful for:
>
> 1. read (nearly) all the image formats that ITK can read using vtkKWImageIO
> -> returns a vtkKWImage, which has the method "GetVTKImage".
>
> 2. at the end of an itk pipeline, pass the itk image to the vtkKWImage
> object using "SetITKImageBase" and get the vtkImageData for your
> visualization pipeline.
>
>
> If you want to read an image and pass it to an itkImage for image
> processing, an itkImageReader is more straightforward.
>
>
> BTW: I am not sure if the vtkKWImageIO class can read Dicom images. I would
> suggest following:
>
> 1. Read dicom images using an itk reader, which can handle dicom
> 2. pass itkImage to vtkKWImage
> 3. pass vtkImageData from vtkKWImage to your viewer (e.g. vtkImageViewer2).
>
>
> If you have 3D images and want to move between slices, and if you maybe
> even want to select pixels (seed points), then you could use my own image
> viewer.
>
> http://www.vision.ee.ethz.ch/~blloyd/ImageViewer/<http://www.vision.ee.ethz.ch/%7Eblloyd/ImageViewer/>
>
> bye
> Bryn
>
>
>
>
>
>
>
> Sergio Aguirre wrote:
>
>> Hello
>>
>> I am trying to do a simple 2D Dicom series reader and viewer using ITK and
>> VTK.
>>
>> Initially I used the itk GDCM class and successfully read a DICOM series
>> and using the itk-vtk imoprter and exporter classes was able to connect the
>> pipelines so that I would write an XML file (VTI) using vtk classes. Then
>> read the vti file and display it in VTK.
>>
>> I would prefer to it without writing the XML file. If I use a different
>> than the vtkXMLwriter class, say vtkImageShifScale or vtkImageViewer2 to
>> catch the DICOM stack I get a segmentation fault.
>>
>> Recently I found the vtkKWImage and vtkKWImageIO classes and was
>> successfull at reading the DICOM files and connecting them to both vtk
>> classes I mentioned (shifter and viewer).
>> http://insight-journal.org/dspace/handle/1926/495
>>
>> BUT I don't know if I could use an itk filter (say
>> itkCurvatureFlowImageFilter) before displaying them since I only found the
>> "Setfilename" and "Setdirectory" options for the vtkKWImage class.
>>
>> Can you use vtkKWImage and vtkKWImageIO in combination with itk Filters?
>>
>> If not, is there an explanation for the segmentation fault I get when not
>> using the XML writer?
>>
>> Thank you,
>>
>> Sergio
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
> --
> -------------------------------------------------
> Bryn Lloyd
> Computer Vision Laboratory
> ETH Zürich, Sternwartstrasse 7
> CH - 8092 Zürich, Switzerland
> Tel: +41 44 63 26668
> Fax: +41 44 63 21199
> -------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090320/2a8c914a/attachment.htm>


More information about the vtkusers mailing list