18 #ifndef itkFastMarchingImageFilter_h
19 #define itkFastMarchingImageFilter_h
105 typename TSpeedImage = Image< float, TLevelSet ::ImageDimension > >
144 { this->NodeType::operator=(node);
return *
this; }
158 itkStaticConstMacro(SetDimension,
unsigned int,
159 LevelSetType::SetDimension);
160 itkStaticConstMacro(SpeedImageDimension,
unsigned int,
161 SpeedImageType::ImageDimension);
180 template<
typename TPixel >
185 InternalRegionIterator;
195 while( !b_it.IsAtEnd() )
199 if( NumberOfPoints == 0 )
201 m_OutsidePoints = NodeContainer::New();
204 m_OutsidePoints->InsertElement( NumberOfPoints++, node );
215 m_OutsidePoints = points;
224 m_AlivePoints = points;
232 return m_AlivePoints;
239 m_TrialPoints = points;
247 return m_TrialPoints;
261 m_SpeedConstant = value;
268 itkGetConstReferenceMacro(SpeedConstant,
double);
274 itkSetMacro(NormalizationFactor,
double);
275 itkGetConstMacro(NormalizationFactor,
double);
281 itkSetMacro(StoppingValue,
double);
284 itkGetConstReferenceMacro(StoppingValue,
double);
290 itkSetMacro(CollectPoints,
bool);
293 itkGetConstReferenceMacro(CollectPoints,
bool);
294 itkBooleanMacro(CollectPoints);
303 return m_ProcessedPoints;
313 { m_OutputRegion = size; }
315 {
return m_OutputRegion.GetSize(); }
316 itkSetMacro(OutputRegion, OutputRegionType);
317 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
318 itkSetMacro(OutputSpacing, OutputSpacingType);
319 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
320 itkSetMacro(OutputDirection, OutputDirectionType);
321 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
322 itkSetMacro(OutputOrigin, OutputPointType);
323 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
324 itkSetMacro(OverrideOutputInformation,
bool);
325 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
326 itkBooleanMacro(OverrideOutputInformation);
329 #ifdef ITK_USE_CONCEPT_CHECKING
345 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
347 virtual void Initialize(LevelSetImageType *);
349 virtual void UpdateNeighbors(
const IndexType & index,
350 const SpeedImageType *, LevelSetImageType *);
352 virtual double UpdateValue(
const IndexType & index,
353 const SpeedImageType *, LevelSetImageType *);
356 {
return m_NodesUsed[idx]; }
358 void GenerateData() ITK_OVERRIDE;
361 virtual
void GenerateOutputInformation() ITK_OVERRIDE;
363 virtual
void EnlargeOutputRequestedRegion(
DataObject *output) ITK_OVERRIDE;
373 LevelSetIndexType m_StartIndex;
374 LevelSetIndexType m_LastIndex;
376 itkGetConstReferenceMacro(StartIndex, LevelSetIndexType);
377 itkGetConstReferenceMacro(LastIndex, LevelSetIndexType);
388 double m_SpeedConstant;
389 double m_InverseSpeed;
390 double m_StoppingValue;
392 bool m_CollectPoints;
399 bool m_OverrideOutputInformation;
409 typedef std::priority_queue<
AxisNodeType, HeapContainer, NodeComparer >
414 double m_NormalizationFactor;
418 #ifndef ITK_MANUAL_INSTANTIATION
419 #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
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
~FastMarchingImageFilter()
void SetTrialPoints(NodeContainer *points)
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
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.
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.
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
TLevelSet::Pointer LevelSetPointer