18#ifndef itkMultiphaseFiniteDifferenceImageFilter_h
19#define itkMultiphaseFiniteDifferenceImageFilter_h
23#include "vnl/vnl_vector.h"
141template <
typename TInputImage,
142 typename TFeatureImage,
143 typename TOutputImage,
145 typename TIdCell =
unsigned int>
168#ifndef ITK_FUTURE_LEGACY_REMOVE
169 using InputCoordRepType ITK_FUTURE_DEPRECATED(
170 "ITK 6 discourages using `InputCoordRepType`. Please use `InputCoordinateType` instead!") =
InputCoordinateType;
206 using TimeStepType =
typename FiniteDifferenceFunctionType::TimeStepType;
208 using RadiusType =
typename FiniteDifferenceFunctionType::RadiusType;
248 itkSetMacro(NumberOfIterations,
unsigned int);
249 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
253 itkSetMacro(UseImageSpacing,
bool);
254 itkBooleanMacro(UseImageSpacing);
255 itkGetConstReferenceMacro(UseImageSpacing,
bool);
259 itkSetMacro(MaximumRMSError,
double);
260 itkGetConstReferenceMacro(MaximumRMSError,
double);
264 itkSetMacro(RMSChange,
double);
265 itkGetConstReferenceMacro(RMSChange,
double);
268 itkSetMacro(InitializedState,
bool);
269 itkGetConstReferenceMacro(InitializedState,
bool);
270 itkBooleanMacro(InitializedState);
274 itkSetMacro(ManualReinitialization,
bool);
275 itkGetConstReferenceMacro(ManualReinitialization,
bool);
276 itkBooleanMacro(ManualReinitialization);
279 itkSetMacro(ElapsedIterations,
unsigned int);
282 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
288 m_LevelSet[i]->SetRequestedRegion(levelSet->GetRequestedRegion());
289 m_LevelSet[i]->SetBufferedRegion(levelSet->GetBufferedRegion());
290 m_LevelSet[i]->SetLargestPossibleRegion(levelSet->GetLargestPossibleRegion());
313 itkExceptionMacro(
"Request for level set #" << i <<
" but there are only " <<
m_FunctionCount);
525#ifndef ITK_MANUAL_INSTANTIATION
526# include "itkMultiphaseFiniteDifferenceImageFilter.hxx"
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
void Set(const PixelType &value) const
virtual void InPlaceOff()
InPlaceImageFilter()=default
Control indentation during Print() invocation.
typename FeatureImageType::SpacingType FeatureSpacingType
typename InputImageType::IndexType InputIndexType
virtual void AllocateUpdateBuffer()=0
std::vector< IdCellType > VectorIdCellType
bool m_ManualReinitialization
typename InputIndexType::IndexValueType InputIndexValueType
typename InputImageType::SpacingType InputSpacingType
virtual void ApplyUpdate(TimeStepType dt)=0
typename InputImageType::SizeType InputSizeType
typename OutputImageType::RegionType OutputRegionType
IdCellType m_FunctionCount
virtual void SetDifferenceFunction(const IdCellType &functionIndex, FiniteDifferenceFunctionPointer function)
void SetLevelSet(const IdCellType &i, const InputImageType *levelSet)
TFeatureImage FeatureImageType
virtual void PostProcessOutput()
virtual void CopyInputToOutput()=0
void GenerateInputRequestedRegion() override
typename FiniteDifferenceFunctionType::Pointer FiniteDifferenceFunctionPointer
virtual void InitializeIteration()
virtual bool ThreadedHalt(void *threadInfo)
std::vector< InputImagePointer > m_LevelSet
SmartPointer< Self > Pointer
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
typename InputImageType::PointType InputPointType
void SetLookup(VectorIdCellType lookup)
static constexpr unsigned int ImageDimension
~MultiphaseFiniteDifferenceImageFilter() override=default
Statistics::KdTreeGenerator< SampleType > KdTreeGeneratorType
void SetFunctionCount(const IdCellType &n)
typename FeatureImageType::SizeType FeatureSizeType
typename KdTreeType::Pointer KdTreePointer
virtual void Initialize()
unsigned int m_NumberOfIterations
Statistics::ListSample< CentroidVectorType > SampleType
virtual const FiniteDifferenceFunctionPointer GetDifferenceFunction(const IdCellType &functionIndex) const
TInputImage InputImageType
typename KdTreeGeneratorType::KdTreeType KdTreeType
InputImagePointer GetLevelSet(const IdCellType &i)
typename FiniteDifferenceFunctionType::RadiusType RadiusType
typename FeatureImageType::RegionType FeatureRegionType
typename InputPointType::CoordinateType InputCoordinateType
typename InputImageType::OffsetValueType InputOffsetValueType
typename FeatureImageType::PointType FeaturePointType
TimeStepType ResolveTimeStep(const TimeStepVectorType &timeStepList, const std::vector< uint8_t > &valid)
typename KdTreeGeneratorType::Pointer KdTreeGeneratorPointer
typename InputImageType::PixelType InputPixelType
typename InputSizeType::SizeValueType InputSizeValueType
typename InputImageType::RegionType InputRegionType
void GenerateData() override
typename FeatureImageType::Pointer FeatureImagePointer
unsigned int m_ElapsedIterations
void PrintSelf(std::ostream &os, Indent indent) const override
typename std::vector< TimeStepType > TimeStepVectorType
MultiphaseFiniteDifferenceImageFilter Self
typename InputImageType::Pointer InputImagePointer
typename FeatureImageType::PixelType FeaturePixelType
std::vector< FiniteDifferenceFunctionPointer > m_DifferenceFunctions
MultiphaseFiniteDifferenceImageFilter()
VectorIdCellType m_Lookup
InPlaceImageFilter< TFeatureImage, TOutputImage > Superclass
virtual TimeStepType CalculateChange()=0
typename OutputImageType::SizeValueType OutputSizeValueType
SmartPointer< const Self > ConstPointer
void SetKdTree(KdTreeType *kdtree)
Vector< float, Self::ImageDimension > CentroidVectorType
TFunction FiniteDifferenceFunctionType
typename OutputImageType::IndexType OutputIndexType
typename OutputImageType::Pointer OutputImagePointer
TOutputImage OutputImageType
typename OutputImageType::IndexValueType OutputIndexValueType
typename OutputImageType::PixelType OutputPixelType
typename OutputImageType::SizeType OutputSizeType
typename FiniteDifferenceFunctionType::TimeStepType TimeStepType
static constexpr T max(const T &)
Implements transparent reference counting.
This class generates a KdTree object without centroid information.
SmartPointer< Self > Pointer
KdTree< SampleType > KdTreeType
This class is the native implementation of the a Sample with an STL container.
A templated class holding a n-Dimensional vector.
static constexpr double eps
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
constexpr TContainer MakeFilled(typename TContainer::const_reference value)