[vtkusers] ITK-VTK Dicom series display

Andaharoo Andx_roo at live.com
Fri Mar 16 15:42:17 EDT 2018


I'd suggest using vtk's dicom extension as it has more bells and whistles
than the basic dicom reader that comes with VTK. Just rebuild VTK with
vtkDICOM. From usage it is much nicer than ITK's. Also this is a question
more suitable for ITK's mailing list/forum.

To answer the question, you just need to read with ITKs dicom reader. It's
reader outputs an itk image. Throw that image into a itk to vtk filter, call
update, and out comes a vtkImageData. Also itk::ImageToVTKImageFilter and
it's counterpart are in a separate module of ITK. You'll need to rebuild ITK
with this module specified.

Here's some psuedo:
ITKsDicomReader* reader;
reader->SetFileName(name here);
reader->Update();

ItkToVtkFilter* conversion;
conversion->SetInput(reader->GetOutput());
conversion->Update();

vtkImageData* thisIsTheOutput = conversion->GetOutput();

Conversion Example:
https://itk.org/Wiki/ITK/Examples/IO/ImageToVTKImageFilter
ITK Dicom Reading example:https:
//itk.org/Doxygen46/html/IO_2DicomImageReadWrite_8cxx-example.html



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list