[vtkusers] How can I read DICOM files ranging from 1 to 100 using vtkVolume16Reader?

timlen xan tinglenxan at gmail.com
Sat Mar 29 22:24:14 EDT 2014


I have a lot of DICOM files located in a directory,but i just want to read
some of them to perform 3D-Reconstruction,so i get the code the following:

                            vtkVolume16Reader *imageseries=vtkVolume16Reader
::New();

    imageseries->SetDataDimensions(imageseries->GetDataDimensions());

    imageseries->SetImageRange(1,10);

    imageseries->SetDataByteOrderToLittleEndian();

    imageseries->SetFilePrefix("d:/S20");

    imageseries->SetDataSpacing (3.2, 3.2, 1.5);

but the question is that as I run ,a error will be thrown out like that:

  ERROR: In D:\vtksrc\IO\vtkVolume16Reader.cxx, line 187

vtkVolume16Reader (0x126063f0): x, y dimensions 0, 0must be greater than 0.

I totally don't know why ?

    Is there something wrong with my codes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140330/525c9f47/attachment.html>


More information about the vtkusers mailing list