AW: [vtkusers] cutting vtkImage

"Gäbler, Thomas" Thomas.Gaebler at medizin.uni-leipzig.de
Tue Nov 21 03:57:11 EST 2006


Thanks Hendrik,

 

the extents of the image are given correctly:

 

vtkDICOMImageReader dicomReader = new vtkDICOMImageReader();

            dicomReader.SetFileName(file[0].toString());

            vtkImageData imageData = new vtkImageData();

            imageData = dicomReader.GetOutput();

            imageData.Update();

 

            int[] dimensionValues = imageData.GetDimensions();

            double[] pixelValues  = imageData.GetSpacing();

 

            vtkVolume16Reader v16 = new vtkVolume16Reader();

            v16.SetDataDimensions(dimensionValues[0], dimensionValues[1]);

            // v16.GetOutput().SetOrigin(0.0, 0.0, 0.0);

            v16.SetDataByteOrderToLittleEndian();

            v16.SetFilePrefix(file[0].toString());

            v16.SetImageRange(1, file.length - 1);  // because files ... .1 to ... .70 and one ... .dcm file

            v16.SetDataSpacing(pixelValues[0], pixelValues[1], pixelValues[2]);

 

If I show only one slice on screen, everyone has on first, or first and second line few white pixels.

Other tools like MRIConvert shows them correct.

For testing this, I load a dataset from the internet -> same problem.

 

Can this be an issue in vtk?

 

Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061121/3035afda/attachment.htm>


More information about the vtkusers mailing list