18#ifndef itkMultiphaseFiniteDifferenceImageFilter_h
19#define itkMultiphaseFiniteDifferenceImageFilter_h
23#include "vnl/vnl_vector.h"
153template <
typename TInputImage,
154 typename TFeatureImage,
155 typename TOutputImage,
157 typename TIdCell =
unsigned int>
180#ifndef ITK_FUTURE_LEGACY_REMOVE
181 using InputCoordRepType ITK_FUTURE_DEPRECATED(
182 "ITK 6 discourages using `InputCoordRepType`. Please use `InputCoordinateType` instead!") =
InputCoordinateType;
218 using TimeStepType =
typename FiniteDifferenceFunctionType::TimeStepType;
220 using RadiusType =
typename FiniteDifferenceFunctionType::RadiusType;
262 itkSetMacro(NumberOfIterations,
unsigned int);
263 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
268 itkSetMacro(UseImageSpacing,
bool);
269 itkBooleanMacro(UseImageSpacing);
270 itkGetConstReferenceMacro(UseImageSpacing,
bool);
275 itkSetMacro(MaximumRMSError,
double);
276 itkGetConstReferenceMacro(MaximumRMSError,
double);
281 itkSetMacro(RMSChange,
double);
282 itkGetConstReferenceMacro(RMSChange,
double);
286 itkSetMacro(InitializedState,
bool);
287 itkGetConstReferenceMacro(InitializedState,
bool);
288 itkBooleanMacro(InitializedState);
293 itkSetMacro(ManualReinitialization,
bool);
294 itkGetConstReferenceMacro(ManualReinitialization,
bool);
295 itkBooleanMacro(ManualReinitialization);
299 itkSetMacro(ElapsedIterations,
unsigned int);
302 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
308 m_LevelSet[i]->SetRequestedRegion(levelSet->GetRequestedRegion());
309 m_LevelSet[i]->SetBufferedRegion(levelSet->GetBufferedRegion());
310 m_LevelSet[i]->SetLargestPossibleRegion(levelSet->GetLargestPossibleRegion());
333 itkExceptionMacro(
"Request for level set #" << i <<
" but there are only " <<
m_FunctionCount);
546#ifndef ITK_MANUAL_INSTANTIATION
547# 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)