18 #ifndef itkFastMarchingImageFilter_h
19 #define itkFastMarchingImageFilter_h
25 #include "ITKFastMarchingExport.h"
57 extern ITKFastMarching_EXPORT std::ostream &
135 template <
typename TLevelSet,
typename TSpeedImage = Image<
float, TLevelSet::ImageDimension>>
185 this->NodeType::operator=(node);
201 static constexpr
unsigned int SetDimension = LevelSetType::SetDimension;
202 static constexpr
unsigned int SpeedImageDimension = SpeedImageType::ImageDimension;
208 #if !defined(ITK_LEGACY_REMOVE)
210 static constexpr
LabelEnum FarPoint = LabelEnum::FarPoint;
211 static constexpr
LabelEnum AlivePoint = LabelEnum::AlivePoint;
212 static constexpr
LabelEnum TrialPoint = LabelEnum::TrialPoint;
213 static constexpr
LabelEnum InitialTrialPoint = LabelEnum::InitialTrialPoint;
214 static constexpr
LabelEnum OutsidePoint = LabelEnum::OutsidePoint;
223 template <
typename TPixel>
233 typename NodeContainer::ElementIdentifier NumberOfPoints = 0;
238 while (!b_it.IsAtEnd())
242 if (NumberOfPoints == 0)
244 m_OutsidePoints = NodeContainer::New();
246 node.SetIndex(b_it.GetIndex());
247 m_OutsidePoints->InsertElement(NumberOfPoints++, node);
258 m_OutsidePoints = points;
268 m_AlivePoints = points;
277 return m_AlivePoints;
285 m_TrialPoints = points;
294 return m_TrialPoints;
310 m_SpeedConstant = value;
311 m_InverseSpeed = -1.0 * itk::Math::sqr(1.0 / m_SpeedConstant);
317 itkGetConstReferenceMacro(SpeedConstant,
double);
323 itkSetMacro(NormalizationFactor,
double);
324 itkGetConstMacro(NormalizationFactor,
double);
330 itkSetMacro(StoppingValue,
double);
333 itkGetConstReferenceMacro(StoppingValue,
double);
339 itkSetMacro(CollectPoints,
bool);
342 itkGetConstReferenceMacro(CollectPoints,
bool);
343 itkBooleanMacro(CollectPoints);
353 return m_ProcessedPoints;
365 m_OutputRegion = size;
367 virtual OutputSizeType
370 return m_OutputRegion.GetSize();
372 itkSetMacro(OutputRegion, OutputRegionType);
373 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
374 itkSetMacro(OutputSpacing, OutputSpacingType);
375 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
376 itkSetMacro(OutputDirection, OutputDirectionType);
377 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
378 itkSetMacro(OutputOrigin, OutputPointType);
379 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
380 itkSetMacro(OverrideOutputInformation,
bool);
381 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
382 itkBooleanMacro(OverrideOutputInformation);
385 #ifdef ITK_USE_CONCEPT_CHECKING
398 PrintSelf(std::ostream & os,
Indent indent)
const override;
401 Initialize(LevelSetImageType *);
404 UpdateNeighbors(
const IndexType & index,
const SpeedImageType *, LevelSetImageType *);
407 UpdateValue(
const IndexType & index,
const SpeedImageType *, LevelSetImageType *);
412 return m_NodesUsed[idx];
416 GenerateData()
override;
420 GenerateOutputInformation()
override;
423 EnlargeOutputRequestedRegion(
DataObject * output)
override;
467 using HeapType = std::priority_queue<AxisNodeType, HeapContainer, NodeComparer>;
475 #ifndef ITK_MANUAL_INSTANTIATION
476 # include "itkFastMarchingImageFilter.hxx"