18 : m_ShiftUp(0.0), m_ShiftRight(0.0), m_ShiftNormal(0.0), m_ITKAssumedSliceSpacing(0.0), m_NumberOfSlicesApart(1)
22 #define doublepoint(x) \ 28 #define doublevector(x) \ 38 unsigned int numberOfSlicesApart)
41 assert(numberOfSlicesApart);
67 Vector3Dd normal = itk::CrossProduct(right, up);
68 Point3Dd pointAlongNormal = origin2 + normal;
70 double numerator = itk::CrossProduct(pointAlongNormal - origin2, origin2 - origin1).GetSquaredNorm();
71 double denominator = (pointAlongNormal - origin2).GetSquaredNorm();
73 double distance = sqrt(numerator / denominator);
77 MITK_DEBUG <<
" Series seems to contain a tilted (or sheared) geometry";
78 MITK_DEBUG <<
" Distance of expected slice origin from actual slice origin: " << distance;
79 MITK_DEBUG <<
" ==> storing this shift for later analysis:";
100 double signedDistance =
101 (planeNormal[0] * testPoint[0] + planeNormal[1] * testPoint[1] + planeNormal[2] * testPoint[2] -
102 (planeNormal[0] * origin2[0] + planeNormal[1] * origin2[1] + planeNormal[2] * origin2[2])) /
103 sqrt(planeNormal[0] * planeNormal[0] + planeNormal[1] * planeNormal[1] + planeNormal[2] * planeNormal[2]);
116 MITK_DEBUG <<
" tilt angle (deg): " << atan(m_ShiftUp / m_ShiftNormal) * 180.0 / 3.1415926535;
130 Vector3Dd lineOriginToP = p - lineOrigin;
131 double innerProduct = lineOriginToP * lineDirection;
133 double factor = innerProduct / lineDirection.GetSquaredNorm();
134 Point3Dd projection = lineOrigin + factor * lineDirection;
DataCollection - Class to facilitate loading/accessing structured data.