Loading...
Searching...
No Matches
itkMultiOrderBSplineDecompositionImageFilter.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkMultiOrderBSplineDecompositionImageFilter.h,v $
Date: $Date: 2010-03-19 07:06:01 $
Version: $Revision: 1.12 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
Portions of this code are covered under the VTK copyright.
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef itkMultiOrderBSplineDecompositionImageFilter_h
#define itkMultiOrderBSplineDecompositionImageFilter_h
#include <vector>
#include "itkImageLinearIteratorWithIndex.h"
#include <vnl/vnl_matrix.h>
#include "itkImageToImageFilter.h"
namespace itk
{
template <class TInputImage, class TOutputImage>
class ITK_TEMPLATE_EXPORT MultiOrderBSplineDecompositionImageFilter
: public ImageToImageFilter<TInputImage, TOutputImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(MultiOrderBSplineDecompositionImageFilter);
using Self = MultiOrderBSplineDecompositionImageFilter;
using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkTypeMacro(MultiOrderBSplineDecompositionImageFilter, ImageToImageFilter);
itkNewMacro(Self);
using typename Superclass::InputImageType;
using typename Superclass::InputImagePointer;
using typename Superclass::InputImageConstPointer;
using typename Superclass::OutputImagePointer;
using CoeffType = typename itk::NumericTraits<typename TOutputImage::PixelType>::RealType;
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
using OutputLinearIterator = ImageLinearIteratorWithIndex<TOutputImage>;
void
SetSplineOrder(unsigned int order);
void
SetSplineOrder(unsigned int dimension, unsigned int order);
void
GetSplineOrder(unsigned int dimension)
{
return m_SplineOrder[dimension];
}
#ifdef ITK_USE_CONCEPT_CHECKING
itkConceptMacro(DimensionCheck, (Concept::SameDimension<ImageDimension, OutputImageDimension>));
itkConceptMacro(InputConvertibleToOutputCheck,
(Concept::Convertible<typename TInputImage::PixelType, typename TOutputImage::PixelType>));
itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, typename TOutputImage::PixelType>));
#endif
protected:
MultiOrderBSplineDecompositionImageFilter();
~MultiOrderBSplineDecompositionImageFilter() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
void
GenerateData() override;
void
GenerateInputRequestedRegion() override;
void
EnlargeOutputRequestedRegion(DataObject * output) override;
std::vector<CoeffType> m_Scratch{}; // temp storage for processing of Coefficients
typename TInputImage::SizeType m_DataLength{}; // Image size
unsigned int
m_SplineOrder[ImageDimension]{}; // User specified spline order per dimension (3rd or cubic is the default)
double m_SplinePoles[3]{}; // Poles calculated for a given spline order
int m_NumberOfPoles{}; // number of poles
double m_Tolerance{}; // Tolerance used for determining initial causal coefficient
unsigned int m_IteratorDirection{}; // Direction for iterator incrementing
private:
virtual void
SetPoles(unsigned int dimension);
virtual bool
DataToCoefficients1D();
void
DataToCoefficientsND();
virtual void
SetInitialCausalCoefficient(double z);
virtual void
SetInitialAntiCausalCoefficient(double z);
void
CopyImageToImage();
void
CopyCoefficientsToScratch(OutputLinearIterator &);
void
CopyScratchToCoefficients(OutputLinearIterator &);
};
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkMultiOrderBSplineDecompositionImageFilter.hxx"
#endif
#endif
itk::MultiOrderBSplineDecompositionImageFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion() override
itk::MultiOrderBSplineDecompositionImageFilter::itkStaticConstMacro
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::MultiOrderBSplineDecompositionImageFilter::CoeffType
typename itk::NumericTraits< typename TOutputImage::PixelType >::RealType CoeffType
Definition itkMultiOrderBSplineDecompositionImageFilter.h:105
itk::MultiOrderBSplineDecompositionImageFilter::Superclass
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition itkMultiOrderBSplineDecompositionImageFilter.h:89
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_IteratorDirection
unsigned int m_IteratorDirection
Definition itkMultiOrderBSplineDecompositionImageFilter.h:164
itk::MultiOrderBSplineDecompositionImageFilter::SetSplineOrder
void SetSplineOrder(unsigned int order)
itk::MultiOrderBSplineDecompositionImageFilter::SetPoles
virtual void SetPoles(unsigned int dimension)
itk::MultiOrderBSplineDecompositionImageFilter::SetInitialAntiCausalCoefficient
virtual void SetInitialAntiCausalCoefficient(double z)
itk::MultiOrderBSplineDecompositionImageFilter::MultiOrderBSplineDecompositionImageFilter
MultiOrderBSplineDecompositionImageFilter()
itk::MultiOrderBSplineDecompositionImageFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkMultiOrderBSplineDecompositionImageFilter.h:91
itk::MultiOrderBSplineDecompositionImageFilter::CopyScratchToCoefficients
void CopyScratchToCoefficients(OutputLinearIterator &)
itk::MultiOrderBSplineDecompositionImageFilter::OutputLinearIterator
ImageLinearIteratorWithIndex< TOutputImage > OutputLinearIterator
Definition itkMultiOrderBSplineDecompositionImageFilter.h:112
itk::MultiOrderBSplineDecompositionImageFilter::~MultiOrderBSplineDecompositionImageFilter
~MultiOrderBSplineDecompositionImageFilter() override=default
itk::MultiOrderBSplineDecompositionImageFilter::SetInitialCausalCoefficient
virtual void SetInitialCausalCoefficient(double z)
itk::MultiOrderBSplineDecompositionImageFilter::SetSplineOrder
void SetSplineOrder(unsigned int dimension, unsigned int order)
itk::MultiOrderBSplineDecompositionImageFilter::CopyCoefficientsToScratch
void CopyCoefficientsToScratch(OutputLinearIterator &)
itk::MultiOrderBSplineDecompositionImageFilter::DataToCoefficients1D
virtual bool DataToCoefficients1D()
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_SplineOrder
unsigned int m_SplineOrder[ImageDimension]
Definition itkMultiOrderBSplineDecompositionImageFilter.h:160
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_Scratch
std::vector< CoeffType > m_Scratch
Definition itkMultiOrderBSplineDecompositionImageFilter.h:156
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_NumberOfPoles
int m_NumberOfPoles
Definition itkMultiOrderBSplineDecompositionImageFilter.h:162
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_DataLength
TImageType::SizeType m_DataLength
Definition itkMultiOrderBSplineDecompositionImageFilter.h:157
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_SplinePoles
double m_SplinePoles[3]
Definition itkMultiOrderBSplineDecompositionImageFilter.h:161
itk::MultiOrderBSplineDecompositionImageFilter< TImageType, CoefficientImageType >::m_Tolerance
double m_Tolerance
Definition itkMultiOrderBSplineDecompositionImageFilter.h:163
itk::MultiOrderBSplineDecompositionImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::MultiOrderBSplineDecompositionImageFilter::GetSplineOrder
void GetSplineOrder(unsigned int dimension)
Definition itkMultiOrderBSplineDecompositionImageFilter.h:123
itk::MultiOrderBSplineDecompositionImageFilter::EnlargeOutputRequestedRegion
void EnlargeOutputRequestedRegion(DataObject *output) override
itk::MultiOrderBSplineDecompositionImageFilter::Pointer
SmartPointer< Self > Pointer
Definition itkMultiOrderBSplineDecompositionImageFilter.h:90
itk::MultiOrderBSplineDecompositionImageFilter::Self
MultiOrderBSplineDecompositionImageFilter Self
Definition itkMultiOrderBSplineDecompositionImageFilter.h:88
itk::MultiOrderBSplineDecompositionImageFilter::DataToCoefficientsND
void DataToCoefficientsND()
itk::MultiOrderBSplineDecompositionImageFilter::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
itk::MultiOrderBSplineDecompositionImageFilter::GenerateData
void GenerateData() override
itk::MultiOrderBSplineDecompositionImageFilter::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(MultiOrderBSplineDecompositionImageFilter)
itk::MultiOrderBSplineDecompositionImageFilter::CopyImageToImage
void CopyImageToImage()
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |