[Insight-users] From Vtk To itk...
Luis Ibanez
luis.ibanez at kitware.com
Thu, 22 Jan 2004 17:32:27 -0500
Yasser,
If you need to convert a VTK image
into an ITK one you use the filter
itkVTKImageToImageFilter.
You will find the files in the directory:
InsightApplications/Auxiliary/vtk
itkVTKImageToImageFilter.h
itkVTKImageToImageFilter.txx
With this filter you can do:
VTKReader-->VTK2ITK---ITKSegmentation-->
--->ITK2VTK--->VTKContour..... visualization
Please look at the tutorial session
http://www.itk.org/CourseWare/Training/GettingStarted-II.pdf
Regards,
Luis
----------------------------
yasser salman wrote:
> hi ALL..,
>
> i run sample code that Luis sent and it works well
> (thanx luis..)..,
> but at the begining i read the files or volumes using
> Vtk , like that
>
>
> Reader->SetFilePrefix(VolData_FName);
> Reader->SetFilePattern("%s%.1d.dcm");
> Reader->SetDataByteOrderToLittleEndian();
> Reader->SetDataScalarTypeToUnsignedShort();
>
> Reader->SetDataExtent
> (0,VolData_Width,0,VolData_Height,1,VolData_Images);
> Reader->SetDataOrigin(0,0,0);
>
> Reader->SetDataSpacing(VolData_Xsize,VolData_Ysize,VolData_Zsize);
> Reader->Update();
>
> so how can i send this volume to Itk (and then use
> Luis code for segmentation and back again to
> visualize)..
> thanx All..,
> yasser
>
>