18 #ifndef itkFastMarchingImageFilter_h
19 #define itkFastMarchingImageFilter_h
108 typename TSpeedImage = Image< float, TLevelSet ::ImageDimension > >
147 { this->NodeType::operator=(node);
return *
this; }
161 itkStaticConstMacro(SetDimension,
unsigned int,
162 LevelSetType::SetDimension);
163 itkStaticConstMacro(SpeedImageDimension,
unsigned int,
164 SpeedImageType::ImageDimension);
183 template<
typename TPixel >
188 InternalRegionIterator;
198 while( !b_it.IsAtEnd() )
202 if( NumberOfPoints == 0 )
204 m_OutsidePoints = NodeContainer::New();
207 m_OutsidePoints->InsertElement( NumberOfPoints++, node );
218 m_OutsidePoints = points;
227 m_AlivePoints = points;
235 return m_AlivePoints;
242 m_TrialPoints = points;
250 return m_TrialPoints;
264 m_SpeedConstant = value;
271 itkGetConstReferenceMacro(SpeedConstant,
double);
277 itkSetMacro(NormalizationFactor,
double);
278 itkGetConstMacro(NormalizationFactor,
double);
284 itkSetMacro(StoppingValue,
double);
287 itkGetConstReferenceMacro(StoppingValue,
double);
293 itkSetMacro(CollectPoints,
bool);
296 itkGetConstReferenceMacro(CollectPoints,
bool);
297 itkBooleanMacro(CollectPoints);
306 return m_ProcessedPoints;
316 { m_OutputRegion = size; }
318 {
return m_OutputRegion.GetSize(); }
319 itkSetMacro(OutputRegion, OutputRegionType);
320 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
321 itkSetMacro(OutputSpacing, OutputSpacingType);
322 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
323 itkSetMacro(OutputDirection, OutputDirectionType);
324 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
325 itkSetMacro(OutputOrigin, OutputPointType);
326 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
327 itkSetMacro(OverrideOutputInformation,
bool);
328 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
329 itkBooleanMacro(OverrideOutputInformation);
332 #ifdef ITK_USE_CONCEPT_CHECKING
348 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
350 virtual void Initialize(LevelSetImageType *);
352 virtual void UpdateNeighbors(
const IndexType & index,
353 const SpeedImageType *, LevelSetImageType *);
355 virtual double UpdateValue(
const IndexType & index,
356 const SpeedImageType *, LevelSetImageType *);
359 {
return m_NodesUsed[idx]; }
361 void GenerateData() ITK_OVERRIDE;
364 virtual
void GenerateOutputInformation() ITK_OVERRIDE;
366 virtual
void EnlargeOutputRequestedRegion(
DataObject *output) ITK_OVERRIDE;
376 LevelSetIndexType m_StartIndex;
377 LevelSetIndexType m_LastIndex;
379 itkGetConstReferenceMacro(StartIndex, LevelSetIndexType);
380 itkGetConstReferenceMacro(LastIndex, LevelSetIndexType);
391 double m_SpeedConstant;
392 double m_InverseSpeed;
393 double m_StoppingValue;
395 bool m_CollectPoints;
402 bool m_OverrideOutputInformation;
412 typedef std::priority_queue<
AxisNodeType, HeapContainer, NodeComparer >
417 double m_NormalizationFactor;
421 #ifndef ITK_MANUAL_INSTANTIATION
422 #include "itkFastMarchingImageFilter.hxx"
LevelSetType::PixelType PixelType
void SetBinaryMask(Image< TPixel, SetDimension > *iImage)
SpeedImageType::ConstPointer SpeedImageConstPointer
Light weight base class for most itk classes.
TLevelSet::PixelType PixelType
std::greater< AxisNodeType > NodeComparer
TElementIdentifier ElementIdentifier
void SetSpeedConstant(double value)
std::vector< AxisNodeType > HeapContainer
virtual const RegionType & GetLargestPossibleRegion() const
void SetValue(const PixelType &input)
LevelSetImageType::RegionType OutputRegionType
LabelImageType::Pointer LabelImagePointer
virtual void SetOutputSize(const OutputSizeType &size)
LevelSetImageType::IndexType LevelSetIndexType
void SetOutsidePoints(NodeContainer *points)
TSpeedImage SpeedImageType
FastMarchingImageFilter Self
std::priority_queue< AxisNodeType, HeapContainer, NodeComparer > HeapType
~FastMarchingImageFilter() override
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
void SetTrialPoints(NodeContainer *points)
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
ImageBaseType::DirectionType DirectionType
TLevelSet LevelSetImageType
virtual OutputSizeType GetOutputSize() const
SmartPointer< const Self > ConstPointer
void SetIndex(const IndexType &input)
LevelSetImageType::DirectionType OutputDirectionType
LevelSetImageType::SpacingType OutputSpacingType
Image< unsigned char, itkGetStaticConstMacro(SetDimension) > LabelImageType
SmartPointer< Self > Pointer
Represent a node in a level set.
ImageBaseType::PointType PointType
LevelSetTypeDefault< TLevelSet > LevelSetType
NodeType::IndexType NodeIndexType
const AxisNodeType & GetNodeUsedInCalculation(unsigned int idx) const
LevelSetType::NodeContainer NodeContainer
const AxisNodeType & operator=(const NodeType &node)
LevelSetType::LevelSetPointer LevelSetPointer
NodeContainerPointer GetTrialPoints()
LabelImagePointer GetLabelImage() const
ImageSource< TLevelSet > Superclass
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.
LevelSetType::LevelSetImageType LevelSetImageType
SpeedImageType::Pointer SpeedImagePointer
Control indentation during Print() invocation.
ImageBaseType::SizeType SizeType
LevelSetImageType::PointType OutputPointType
Solve an Eikonal equation using Fast Marching.
LevelSetType::NodeType NodeType
LevelSetImageType::SizeType OutputSizeType
#define itkConceptMacro(name, concept)
Level set type information.
Index< itkGetStaticConstMacro(SetDimension) > IndexType
Base class for all data objects in ITK.
NodeContainerPointer GetAlivePoints()
Templated n-dimensional image class.
void SetAlivePoints(NodeContainer *points)
LevelSetType::NodeContainerPointer NodeContainerPointer
NodeContainerPointer GetProcessedPoints() const
ImageBaseType::IndexType IndexType
TLevelSet::Pointer LevelSetPointer