18 #ifndef __itkFastMarchingImageFilter_h
19 #define __itkFastMarchingImageFilter_h
24 #include "vnl/vnl_math.h"
104 class TSpeedImage = Image< float, TLevelSet ::ImageDimension > >
142 { this->NodeType::operator=(node);
return *
this; }
156 itkStaticConstMacro(SetDimension,
unsigned int,
157 LevelSetType::SetDimension);
158 itkStaticConstMacro(SpeedImageDimension,
unsigned int,
159 SpeedImageType::ImageDimension);
178 template<
typename TPixel >
183 InternalRegionIterator;
188 size_t NumberOfPoints = 0;
193 while( !b_it.IsAtEnd() )
195 if( b_it.Get() == zero_value )
197 if( NumberOfPoints == 0 )
199 m_OutsidePoints = NodeContainer::New();
202 m_OutsidePoints->InsertElement( NumberOfPoints++, node );
213 m_OutsidePoints = points;
222 m_AlivePoints = points;
230 return m_AlivePoints;
237 m_TrialPoints = points;
245 return m_TrialPoints;
257 void SetSpeedConstant(
double value)
259 m_SpeedConstant = value;
260 m_InverseSpeed = -1.0 * vnl_math_sqr(1.0 / m_SpeedConstant);
266 itkGetConstReferenceMacro(SpeedConstant,
double);
272 itkSetMacro(NormalizationFactor,
double);
273 itkGetConstMacro(NormalizationFactor,
double);
279 itkSetMacro(StoppingValue,
double);
282 itkGetConstReferenceMacro(StoppingValue,
double);
288 itkSetMacro(CollectPoints,
bool);
291 itkGetConstReferenceMacro(CollectPoints,
bool);
292 itkBooleanMacro(CollectPoints);
301 return m_ProcessedPoints;
311 { m_OutputRegion = size; }
313 {
return m_OutputRegion.GetSize(); }
314 itkSetMacro(OutputRegion, OutputRegionType);
315 itkGetConstReferenceMacro(OutputRegion, OutputRegionType);
316 itkSetMacro(OutputSpacing, OutputSpacingType);
317 itkGetConstReferenceMacro(OutputSpacing, OutputSpacingType);
318 itkSetMacro(OutputDirection, OutputDirectionType);
319 itkGetConstReferenceMacro(OutputDirection, OutputDirectionType);
320 itkSetMacro(OutputOrigin, OutputPointType);
321 itkGetConstReferenceMacro(OutputOrigin, OutputPointType);
322 itkSetMacro(OverrideOutputInformation,
bool);
323 itkGetConstReferenceMacro(OverrideOutputInformation,
bool);
324 itkBooleanMacro(OverrideOutputInformation);
327 #ifdef ITK_USE_CONCEPT_CHECKING
344 void PrintSelf(std::ostream & os,
Indent indent)
const;
346 virtual void Initialize(LevelSetImageType *);
348 virtual void UpdateNeighbors(
const IndexType & index,
349 const SpeedImageType *, LevelSetImageType *);
351 virtual double UpdateValue(
const IndexType & index,
352 const SpeedImageType *, LevelSetImageType *);
355 {
return m_NodesUsed[idx]; }
360 virtual void GenerateOutputInformation();
362 virtual void EnlargeOutputRequestedRegion(
DataObject *output);
380 void operator=(
const Self &);
409 typedef std::priority_queue< AxisNodeType, HeapContainer, NodeComparer >
418 #ifndef ITK_MANUAL_INSTANTIATION
419 #include "itkFastMarchingImageFilter.hxx"