18 #ifndef itkMultiphaseFiniteDifferenceImageFilter_h
19 #define itkMultiphaseFiniteDifferenceImageFilter_h
23 #include "vnl/vnl_vector.h"
160 template<
typename TInputImage,
161 typename TFeatureImage,
162 typename TOutputImage,
163 typename TFiniteDifferenceFunction = FiniteDifferenceFunction< TOutputImage >,
164 typename TIdCell =
unsigned int >
221 typedef typename FiniteDifferenceFunctionType::TimeStepType
TimeStepType;
223 typedef typename FiniteDifferenceFunctionType::RadiusType
RadiusType;
266 itkSetMacro(NumberOfIterations,
unsigned int);
267 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
272 itkSetMacro(UseImageSpacing,
bool);
273 itkBooleanMacro(UseImageSpacing);
274 itkGetConstReferenceMacro(UseImageSpacing,
bool);
279 itkSetMacro(MaximumRMSError,
double);
280 itkGetConstReferenceMacro(MaximumRMSError,
double);
285 itkSetMacro(RMSChange,
double);
286 itkGetConstReferenceMacro(RMSChange,
double);
290 itkSetMacro(InitializedState,
bool);
291 itkGetConstReferenceMacro(InitializedState,
bool);
292 itkBooleanMacro(InitializedState);
297 itkSetMacro(ManualReinitialization,
bool);
298 itkGetConstReferenceMacro(ManualReinitialization,
bool);
299 itkBooleanMacro(ManualReinitialization);
303 itkSetMacro(ElapsedIterations,
unsigned int);
306 itkGetConstReferenceMacro(ElapsedIterations,
unsigned int);
311 m_LevelSet[i]->SetRequestedRegion( levelSet->GetRequestedRegion() );
312 m_LevelSet[i]->SetBufferedRegion( levelSet->GetBufferedRegion() );
313 m_LevelSet[i]->SetLargestPossibleRegion( levelSet->GetLargestPossibleRegion() );
323 while ( !in.IsAtEnd() )
335 itkExceptionMacro(
"Request for level set #" << i
370 m_LevelSet.resize(m_FunctionCount, ITK_NULLPTR);
373 this->
m_Lookup.resize(m_FunctionCount);
377 typedef typename std::vector< IdCellType >::iterator VectorIteratorType;
379 VectorIteratorType it = this->
m_Lookup.begin();
381 while ( it != this->
m_Lookup.end() )
516 const std::vector< bool > & valid);
524 void operator=(const
Self &) ITK_DELETE_FUNCTION;
535 #ifndef ITK_MANUAL_INSTANTIATION
536 #include "itkMultiphaseFiniteDifferenceImageFilter.hxx"
virtual void GenerateData() override
FeatureImageType::SpacingType FeatureSpacingType
InputImageType::IndexType InputIndexType
KdTreeGeneratorType::Pointer KdTreeGeneratorPointer
virtual void InPlaceOff()
MultiphaseFiniteDifferenceImageFilter Self
bool m_ManualReinitialization
virtual bool ThreadedHalt(void *)
InputImagePointer GetLevelSet(const IdCellType &i)
signed long OffsetValueType
void SetLookup(VectorIdCellType lookup)
TOutputImage OutputImageType
FiniteDifferenceFunctionType::RadiusType RadiusType
std::vector< TimeStepType > TimeStepVectorType
SmartPointer< Self > Pointer
std::vector< IdCellType > VectorIdCellType
virtual void CopyInputToOutput()=0
InputImageType::Pointer InputImagePointer
TInputImage InputImageType
FiniteDifferenceFunctionType::Pointer FiniteDifferenceFunctionPointer
OutputImageType::RegionType OutputRegionType
signed long IndexValueType
static const unsigned int ImageDimension
virtual void AllocateUpdateBuffer()=0
FeatureImageType::Pointer FeatureImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
InputPointType::CoordRepType InputCoordRepType
OutputImageType::Pointer OutputImagePointer
InPlaceImageFilter< TFeatureImage, TOutputImage > Superclass
InputImageType::PixelType InputPixelType
FiniteDifferenceFunctionType::TimeStepType TimeStepType
unsigned long SizeValueType
virtual const FiniteDifferenceFunctionPointer GetDifferenceFunction(const IdCellType &functionIndex) const
virtual void ApplyUpdate(TimeStepType dt)=0
OutputImageType::PixelType OutputPixelType
InputImageType::OffsetValueType InputOffsetValueType
MultiphaseFiniteDifferenceImageFilter()
unsigned int m_ElapsedIterations
Statistics::KdTreeGenerator< SampleType > KdTreeGeneratorType
unsigned int m_NumberOfIterations
SmartPointer< const Self > ConstPointer
FeatureImageType::PointType FeaturePointType
virtual TimeStepType CalculateChange()=0
InputImageType::RegionType InputRegionType
TFiniteDifferenceFunction FiniteDifferenceFunctionType
Statistics::ListSample< CentroidVectorType > SampleType
InputImageType::Pointer InputImagePointer
A templated class holding a n-Dimensional vector.
void SetFunctionCount(const IdCellType &n)
OutputImageType::SizeValueType OutputSizeValueType
TimeStepType ResolveTimeStep(const TimeStepVectorType &timeStepList, const std::vector< bool > &valid)
std::vector< InputImagePointer > m_LevelSet
A multi-dimensional iterator templated over image type that walks a region of pixels.
TFeatureImage InputImageType
InputImageType::SizeType InputSizeType
virtual void PostProcessOutput()
virtual void GenerateInputRequestedRegion() override
virtual void Initialize()
This class generates a KdTree object without centroid information.
InputSizeType::SizeValueType InputSizeValueType
IdCellType m_FunctionCount
Vector< float, itkGetStaticConstMacro(ImageDimension) > CentroidVectorType
KdTreeGeneratorType::KdTreeType KdTreeType
~MultiphaseFiniteDifferenceImageFilter()
OutputImageType::IndexValueType OutputIndexValueType
FeatureImageType::RegionType FeatureRegionType
void SetLevelSet(const IdCellType &i, const InputImageType *levelSet)
VectorIdCellType m_Lookup
This class is the native implementation of the a Sample with an STL container.
KdTreeType::Pointer KdTreePointer
InputIndexType::IndexValueType InputIndexValueType
Control indentation during Print() invocation.
FeatureImageType::PixelType FeaturePixelType
virtual void SetDifferenceFunction(const IdCellType &functionIndex, FiniteDifferenceFunctionPointer function)
OutputImageType::SizeType OutputSizeType
OutputImageType::IndexType OutputIndexType
void SetKdTree(KdTreeType *kdtree)
Base class for filters that take an image as input and overwrite that image as the output...
TFeatureImage FeatureImageType
std::vector< FiniteDifferenceFunctionPointer > m_DifferenceFunctions
This class provides methods for k-nearest neighbor search and related data structures for a k-d tree...
InputImageType::PointType InputPointType
A multi-dimensional iterator templated over image type that walks a region of pixels.
InputImageType::SpacingType InputSpacingType
FeatureImageType::SizeType FeatureSizeType
virtual void InitializeIteration()