18 #ifndef itkFastMarchingImageFilter_h
19 #define itkFastMarchingImageFilter_h
108 typename TSpeedImage = Image< float, TLevelSet ::ImageDimension > >
149 { this->NodeType::operator=(node);
return *
this; }
163 static constexpr
unsigned int SetDimension = LevelSetType::SetDimension;
164 static constexpr
unsigned int SpeedImageDimension = SpeedImageType::ImageDimension;
182 template<
typename TPixel >
191 typename NodeContainer::ElementIdentifier NumberOfPoints = 0;
196 while( !b_it.IsAtEnd() )
200 if( NumberOfPoints == 0 )
202 m_OutsidePoints = NodeContainer::New();
204 node.SetIndex( b_it.GetIndex() );
205 m_OutsidePoints->InsertElement( NumberOfPoints++, node );
216 m_OutsidePoints = points;
225 m_AlivePoints = points;
233 return m_AlivePoints;
240 m_TrialPoints = points;
248 return m_TrialPoints;
262 m_SpeedConstant = value;
263 m_InverseSpeed = -1.0 * itk::Math::sqr(1.0 / m_SpeedConstant);
269 itkGetConstReferenceMacro(SpeedConstant,
double);
275 itkSetMacro(NormalizationFactor,
double);
276 itkGetConstMacro(NormalizationFactor,
double);
282 itkSetMacro(StoppingValue,
double);
285 itkGetConstReferenceMacro(StoppingValue,
double);
291 itkSetMacro(CollectPoints,
bool);
294 itkGetConstReferenceMacro(CollectPoints,
bool);
295 itkBooleanMacro(CollectPoints);
304 return m_ProcessedPoints;
314 { m_OutputRegion = size; }
316 {
return m_OutputRegion.GetSize(); }
317 itkSetMacro(OutputRegion, OutputRegionType);
318 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
319 itkSetMacro(OutputSpacing, OutputSpacingType);
320 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
321 itkSetMacro(OutputDirection, OutputDirectionType);
322 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
323 itkSetMacro(OutputOrigin, OutputPointType);
324 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
325 itkSetMacro(OverrideOutputInformation,
bool);
326 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
327 itkBooleanMacro(OverrideOutputInformation);
330 #ifdef ITK_USE_CONCEPT_CHECKING
346 void PrintSelf(std::ostream & os,
Indent indent)
const override;
348 virtual void Initialize(LevelSetImageType *);
350 virtual void UpdateNeighbors(
const IndexType & index,
351 const SpeedImageType *, LevelSetImageType *);
353 virtual double UpdateValue(
const IndexType & index,
354 const SpeedImageType *, LevelSetImageType *);
357 {
return m_NodesUsed[idx]; }
359 void GenerateData()
override;
362 void GenerateOutputInformation()
override;
364 void EnlargeOutputRequestedRegion(
DataObject *output)
override;
409 std::priority_queue< AxisNodeType, HeapContainer, NodeComparer >;
417 #ifndef ITK_MANUAL_INSTANTIATION
418 #include "itkFastMarchingImageFilter.hxx"
typename LevelSetImageType::DirectionType OutputDirectionType
void SetBinaryMask(Image< TPixel, SetDimension > *iImage)
OutputRegionType m_BufferedRegion
typename LevelSetImageType::SizeType OutputSizeType
NodeContainerPointer m_ProcessedPoints
typename LevelSetType::NodeType NodeType
typename NodeContainer::Pointer NodeContainerPointer
Light weight base class for most itk classes.
typename SpeedImageType::Pointer SpeedImagePointer
typename LevelSetType::LevelSetPointer LevelSetPointer
LevelSetImageType::PixelType m_LargeValue
typename LevelSetType::LevelSetImageType LevelSetImageType
std::priority_queue< AxisNodeType, HeapContainer, NodeComparer > HeapType
LabelImagePointer m_LabelImage
typename LevelSetImageType::RegionType OutputRegionType
Define numeric traits for std::vector.
Represent a n-dimensional index in a n-dimensional image.
OutputDirectionType m_OutputDirection
void SetSpeedConstant(double value)
virtual const RegionType & GetLargestPossibleRegion() const
OutputSpacingType m_OutputSpacing
virtual void SetOutputSize(const OutputSizeType &size)
void SetOutsidePoints(NodeContainer *points)
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
typename TLevelSet::Pointer LevelSetPointer
bool m_OverrideOutputInformation
void SetTrialPoints(NodeContainer *points)
typename LevelSetType::NodeContainerPointer NodeContainerPointer
std::greater< AxisNodeType > NodeComparer
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
typename TLevelSet::PixelType PixelType
virtual OutputSizeType GetOutputSize() const
double m_NormalizationFactor
std::vector< AxisNodeType > HeapContainer
OutputRegionType m_OutputRegion
ImageBaseType::SizeType SizeType
ImageBaseType::DirectionType DirectionType
Represent a node in a level set.
NodeContainerPointer m_OutsidePoints
NodeContainerPointer m_AlivePoints
ImageBaseType::IndexType IndexType
typename LabelImageType::Pointer LabelImagePointer
const AxisNodeType & GetNodeUsedInCalculation(unsigned int idx) const
LevelSetIndexType m_LastIndex
TSpeedImage SpeedImageType
const AxisNodeType & operator=(const NodeType &node)
typename LevelSetType::NodeContainer NodeContainer
NodeContainerPointer GetTrialPoints()
LabelImagePointer GetLabelImage() const
OutputPointType m_OutputOrigin
Base class for filters that take an image as input and produce an image as output.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
typename LevelSetType::PixelType PixelType
typename SpeedImageType::ConstPointer SpeedImageConstPointer
Control indentation during Print() invocation.
typename LevelSetImageType::SpacingType OutputSpacingType
ImageBaseType::PointType PointType
typename NodeType::IndexType NodeIndexType
TLevelSet LevelSetImageType
Solve an Eikonal equation using Fast Marching.
typename LevelSetImageType::IndexType LevelSetIndexType
NodeContainerPointer m_TrialPoints
ImageBaseType::RegionType RegionType
#define itkConceptMacro(name, concept)
Level set type information.
Base class for all data objects in ITK.
NodeContainerPointer GetAlivePoints()
Templated n-dimensional image class.
void SetAlivePoints(NodeContainer *points)
typename LevelSetImageType::PointType OutputPointType
NodeContainerPointer GetProcessedPoints() const
LevelSetIndexType m_StartIndex