<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT size=2>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.</FONT></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>JB</FONT></DIV>
<DIV><FONT size=2></FONT><FONT face=Arial> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>
<P><FONT size=2>Also, when reading a stack of slices, GetPixelSpacing() does
like this: </FONT></P>
<P><FONT size=2>if (sortedFiles.size() > 1)<BR>
{<BR> vtkstd::pair<float, vtkstd::string> p1 =
sortedFiles[0];<BR> vtkstd::pair<float,
vtkstd::string> p2 = sortedFiles[1];<BR>
this->DataSpacing[2] = fabs(p1.first - p2.first);<BR>
}<BR> else<BR> {<BR>
this->DataSpacing[2] = spacing[2];<BR>
} </FONT></P>
<P><FONT size=2>Why?</FONT></P>
<P><FONT size=2><FONT
face=Arial> </P></FONT></FONT></FONT></DIV></BLOCKQUOTE></BODY></HTML>