18 #ifndef itkBSplineControlPointImageFilter_h
19 #define itkBSplineControlPointImageFilter_h
30 #include "vnl/vnl_matrix.h"
31 #include "vnl/vnl_vector.h"
59 template <
typename TInputImage,
typename TOutputImage = TInputImage>
78 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
84 using PixelType =
typename OutputImageType::PixelType;
98 Self::ImageDimension >;
102 Self::ImageDimension >;
104 Self::ImageDimension >;
108 Self::ImageDimension >;
112 Self::ImageDimension >;
126 void SetSplineOrder(
unsigned int );
137 itkGetConstReferenceMacro( SplineOrder,
ArrayType );
155 itkSetMacro( CloseDimension,
ArrayType );
156 itkGetConstReferenceMacro( CloseDimension,
ArrayType );
208 typename ControlPointLatticeType::Pointer
214 void PrintSelf( std::ostream& os,
Indent indent )
const override;
226 void BeforeThreadedGenerateData()
override;
239 const RealType,
const unsigned int );
252 bool m_DoMultilevel{
false };
253 unsigned int m_MaximumNumberOfLevels{ 1 };
259 vnl_matrix<RealType> m_RefinedLatticeCoefficients[ImageDimension];
275 for (
unsigned int i = 1; i < ImageDimension; i++ )
277 k[i] = size[ImageDimension-i-1]*k[i-1];
280 for (
unsigned int i = 0; i < ImageDimension; i++ )
282 index[ImageDimension-i-1]
283 =
static_cast<unsigned int>( number/k[ImageDimension-i-1] );
284 number %= k[ImageDimension-i-1];
293 #ifndef ITK_MANUAL_INSTANTIATION
294 #include "itkBSplineControlPointImageFilter.hxx"
typename OutputImageType::PointType PointType
typename OutputImageType::SizeType SizeType
typename RealImageType::Pointer RealImagePointer
Process a given a B-spline grid of control points.
typename OutputImageType::IndexType IndexType
typename MeshTraits::PixelType PixelType
typename PointSetType::PointDataContainer PointDataContainerType
ArrayType m_NumberOfControlPoints
TInputImage ControlPointLatticeType
typename PointDataImageType::Pointer PointDataImagePointer
typename OutputImageType::RegionType RegionType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
KernelOrder2Type::Pointer m_KernelOrder2
Base class for all process objects that output image data.
typename OutputImageType::PixelType PixelType
typename PointSetType::PixelType PointDataType
BSpline kernel used for density estimation and nonparameteric regression.
KernelOrder0Type::Pointer m_KernelOrder0
ArrayType m_CloseDimension
KernelOrder1Type::Pointer m_KernelOrder1
KernelOrder3Type::Pointer m_KernelOrder3
ImageBaseType::SizeType SizeType
BSpline kernel used for density estimation and nonparameteric regression.
ImageBaseType::DirectionType DirectionType
typename OutputImageType::RegionType OutputImageRegionType
ImageBaseType::IndexType IndexType
RealImageType::IndexType NumberToIndex(unsigned int number, typename RealImageType::SizeType size)
TOutputImage OutputImageType
Represent a n-dimensional size (bounds) of a n-dimensional image.
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
typename Superclass::SizeType SizeType
typename Superclass::IndexType IndexType
typename MeshTraits::PointDataContainer PointDataContainer
typename OutputImageType::SpacingType SpacingType
static constexpr double e
The base of the natural logarithm or Euler's number
Base class for filters that take an image as input and produce an image as output.
ArrayType m_NumberOfLevels
Control indentation during Print() invocation.
DirectionType m_Direction
ImageBaseType::PointType PointType
typename OutputImageType::PointType OriginType
ImageBaseType::RegionType RegionType
Templated n-dimensional image class.
typename OutputImageType::DirectionType DirectionType