18 #ifndef __itkFastMarchingImageFilter_h
19 #define __itkFastMarchingImageFilter_h
24 #include "vnl/vnl_math.h"
104 class TSpeedImage = Image< float, ::itk::GetImageDimension< TLevelSet >::ImageDimension > >
142 { this->NodeType::operator=(node);
return *
this; }
155 itkStaticConstMacro(SetDimension,
unsigned int,
156 LevelSetType::SetDimension);
157 itkStaticConstMacro(SpeedImageDimension,
unsigned int,
158 SpeedImageType::ImageDimension);
177 template<
typename TPixel >
182 InternalRegionIterator;
187 size_t NumberOfPoints = 0;
192 while( !b_it.IsAtEnd() )
194 if( b_it.Get() == zero_value )
196 if( NumberOfPoints == 0 )
198 m_OutsidePoints = NodeContainer::New();
201 m_OutsidePoints->InsertElement( NumberOfPoints++, node );
212 m_OutsidePoints = points;
221 m_AlivePoints = points;
229 return m_AlivePoints;
236 m_TrialPoints = points;
244 return m_TrialPoints;
256 void SetSpeedConstant(
double value)
258 m_SpeedConstant = value;
259 m_InverseSpeed = -1.0 * vnl_math_sqr(1.0 / m_SpeedConstant);
265 itkGetConstReferenceMacro(SpeedConstant,
double);
271 itkSetMacro(NormalizationFactor,
double);
272 itkGetConstMacro(NormalizationFactor,
double);
278 itkSetMacro(StoppingValue,
double);
281 itkGetConstReferenceMacro(StoppingValue,
double);
287 itkSetMacro(CollectPoints,
bool);
290 itkGetConstReferenceMacro(CollectPoints,
bool);
291 itkBooleanMacro(CollectPoints);
300 return m_ProcessedPoints;
310 { m_OutputRegion = size; }
312 {
return m_OutputRegion.GetSize(); }
313 itkSetMacro(OutputRegion, OutputRegionType);
314 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
315 itkSetMacro(OutputSpacing, OutputSpacingType);
316 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
317 itkSetMacro(OutputDirection, OutputDirectionType);
318 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
319 itkSetMacro(OutputOrigin, OutputPointType);
320 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
321 itkSetMacro(OverrideOutputInformation,
bool);
322 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
323 itkBooleanMacro(OverrideOutputInformation);
326 #ifdef ITK_USE_CONCEPT_CHECKING
342 void PrintSelf(std::ostream & os,
Indent indent)
const;
345 virtual void Initialize(LevelSetImageType *);
347 virtual void UpdateNeighbors(
const IndexType & index,
348 const SpeedImageType *, LevelSetImageType *);
350 virtual double UpdateValue(
const IndexType & index,
351 const SpeedImageType *, LevelSetImageType *);
354 {
return m_NodesUsed[idx]; }
359 virtual void GenerateOutputInformation();
361 virtual void EnlargeOutputRequestedRegion(
DataObject *output);
378 void operator=(
const Self &);
407 typedef std::priority_queue< AxisNodeType, HeapContainer, NodeComparer >
416 #ifndef ITK_MANUAL_INSTANTIATION
417 #include "itkFastMarchingImageFilter.hxx"