[vtkusers] vtkDICOMImageReader: No Image Orientation (patient) information

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Mon Mar 22 11:26:43 EST 2004


Because in your average dicom file the "SliceThickness" tag, is not the same as the "Spacing between Slices" - so if multiple slices are present, use the actual distance between the Pixel corners of each slice as reported by ImagePositionPatient, if only one slice, then use the reported slicethickness.

JB

  Also, when reading a stack of slices, GetPixelSpacing() does like this: 

  if (sortedFiles.size() > 1)
      {
      vtkstd::pair<float, vtkstd::string> p1 = sortedFiles[0];
      vtkstd::pair<float, vtkstd::string> p2 = sortedFiles[1];
      this->DataSpacing[2] = fabs(p1.first - p2.first);
      }
    else
      {
      this->DataSpacing[2] = spacing[2];
      }  

  Why?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040322/5a2e0770/attachment.htm>


More information about the vtkusers mailing list