17 #ifndef __itkFiniteCylinderSpatialFunction_txx
18 #define __itkFiniteCylinderSpatialFunction_txx
26 template <
unsigned int VDimension,
typename TInput>
30 m_Orientation.Fill(1.0f);
36 template <
unsigned int VDimension,
typename TInput >
42 template <
unsigned int VDimension,
typename TInput>
47 double halfAxisLength = 0.5 * m_AxisLength;
52 for(
unsigned int i = 0; i < VDimension; i++)
54 pointVector[i] = position[i] - m_Center[i];
58 medialAxisVector[0] = vcl_sqrt(m_Orientation[0]);
59 medialAxisVector[1] = vcl_sqrt(m_Orientation[1]);
60 medialAxisVector[2] = vcl_sqrt(m_Orientation[2]);
66 if(vcl_fabs(distanceFromCenter) <= (halfAxisLength)
67 && m_Radius >= vcl_sqrt(vcl_pow(pointVector.
GetVnlVector().magnitude(),2.0) - vcl_pow(distanceFromCenter,2.0)))
74 template <
unsigned int VDimension,
typename TInput>
80 Superclass::PrintSelf(os, indent);
82 os << indent <<
"Lengths of Axis: " << m_AxisLength << std::endl;
83 os << indent <<
"Radius: " << m_Radius << std::endl;
84 os << indent <<
"Origin of Cylinder: " << m_Center << std::endl;
85 os << indent <<
"Orientation: " << std::endl;
86 for (i = 0; i < VDimension; i++)
88 os << indent << indent << m_Orientation[i] <<
" ";