[Insight-users] [vtkusers] how to pass vtkimagedata to ITK

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 19 10:42:37 EST 2010


Hi Ali,

Please look at this Insight Journal paper:

"Seamless VTK-ITK pipeline connection for image data handling"

http://www.insight-journal.org/browse/publication/146
http://hdl.handle.net/1926/495

The source code is available at

         InsightApplications/vtk/

                          vtkKWImage.h
                          vtkKWImage.cxx
                          vtkKWImageIO.h
                          vtkKWImageIO.cxx


BTW: You could have done the same process using
ITK components:

                     1) Reading DICOM
                     2) Shrinking the image
                     3) Thresholding the image

You will find instructions on how to do each one
of these things in the ITK Software Guide

        http://www.itk.org/ItkSoftwareGuide.pdf


You may find useful however, to use VTK for displaying
the results of your segmentation and for interacting with
that display.

For example as illustrated in

InsightApplications/Auxiliary/vtk
           itkReadITKImage3DExtractContourVTK.cxx
           itkReadITKImage3DSegmentShowVTK.cxx
           itkReadITKImageSegmentShowVTK.cxx
           itkReadITKImageShowSplineVTK.cxx
           itkReadITKImageShowVTK.cxx




    Regards,


          Luis


-----------------------------------------------------------------
On Wed, Feb 17, 2010 at 11:13 PM, Ali Habib <ali.mahmoud.habib at gmail.com> wrote:
> Dear All,
> I have vtk  image data  I want to pass it to ITK to use segmentation , any
> suggestion please
>             vtk.vtkDICOMImageReader VDR = new vtk.vtkDICOMImageReader();
>             VDR.SetDirectoryName(@"D:\work\Master
> Degree\DataSet\case2\DICOM\PA1\ST1\SE2");
>             VDR.SetDataOrigin(0, 0, 0);
>             VDR.Update();
>             // decrease the dataset data for large data preprocessing
>             vtkImageShrink3D VIS = new vtkImageShrink3D();
>             VIS.SetShrinkFactors(2, 2, 2);
>             VIS.SetInputConnection(VDR.GetOutputPort());
>             VIS.Update();
>             vtkImageThreshold VIT = new vtkImageThreshold();
>             VIT.ThresholdBetween(200, 2000);
>             VIT.SetInputConnection(VIS.GetOutputPort());
>             VIT.Update();
> Best regards
> _______________________________________________
> 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
>
>


More information about the Insight-users mailing list