ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSpeedFunctionToPathFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSpeedFunctionToPathFilter.h,v $
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef itkSpeedFunctionToPathFilter_h
18 #define itkSpeedFunctionToPathFilter_h
19 
22 
23 namespace itk
24 {
25 
64 template <class TInputImage,
65  class TOutputPath = PolyLineParametricPath<TInputImage::ImageDimension> >
66 class ITK_EXPORT SpeedFunctionToPathFilter :
67  public ArrivalFunctionToPathFilter<TInputImage,TOutputPath>
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_ASSIGN(SpeedFunctionToPathFilter);
71 
77 
80 
82  itkNewMacro(Self);
83 
85  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
86 
88  using InputImageType = TInputImage;
89  using InputImagePointer = typename InputImageType::Pointer;
90  using InputImageConstPointer = typename InputImageType::ConstPointer;
92  using InputImagePixelType = typename InputImageType::PixelType;
93 
95  using OutputPathType = TOutputPath;
96  using OutputPathPointer = typename OutputPathType::Pointer;
97  using OutputPathConstPointer = typename OutputPathType::ConstPointer;
98 
100  using ContinuousIndexType = typename Superclass::ContinuousIndexType;
103  using CostFunctionType = typename Superclass::CostFunctionType;
104  using OptimizerType = typename Superclass::OptimizerType;
105 
109 
114  void SetPathEndPoint( const PointType& ) override
115  {
116  itkWarningMacro("SetPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
117  }
118 
123  void AddPathEndPoint( const PointType& ) override
124  {
125  itkWarningMacro("AddPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
126  }
127 
132  void ClearPathEndPoints() override
133  {
134  itkWarningMacro("ClearPathEndPoints() is not valid for this filter. Use ClearPathInfo() instead.");
135  }
136 
140  {
141  m_Information.push_back( info );
142  }
143 
146  {
147  m_Information.clear( );
148  }
149 
151  void Execute( const itk::Object * object, const itk::EventObject & event ) override;
152 
154  itkGetConstMacro( CurrentArrivalFunction, InputImagePointer );
155 
156 protected:
158  ~SpeedFunctionToPathFilter( ) override;
159  void PrintSelf( std::ostream& os, Indent indent ) const override;
160 
162  void GenerateData( void ) override;
163 
165  unsigned int GetNumberOfPathsToExtract( ) const override;
166 
168  InputImageType * ComputeArrivalFunction( ) override;
169 
171  const PointsContainerType & GetNextEndPoint( ) override;
172 
173  std::vector< typename PathInformationType::Pointer > m_Information;
175 };
176 
177 } // end namespace itk
178 
179 #ifndef ITK_MANUAL_INSTANTIATION
180 #include "itkSpeedFunctionToPathFilter.hxx"
181 #endif
182 
183 #endif
PathInfo class for encapsulating information about a path for a SpeedFunctionToPathFilter Object...
This class is a cost function which queries an underlying image for the single value.
Light weight base class for most itk classes.
typename OutputPathType::ConstPointer OutputPathConstPointer
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
Extracts a path from a Fast Marching arrival function.
typename InputImageType::Pointer InputImagePointer
typename OutputPathType::Pointer OutputPathPointer
Definition: itkPathSource.h:63
This class is a base for the Optimization methods that optimize a single valued function.
void AddPathEndPoint(const PointType &) override
std::vector< typename PathInformationType::Pointer > m_Information
void AddPathInformation(PathInformationType *info)
TOutputPath OutputPathType
Definition: itkPathSource.h:62
void SetPathEndPoint(const PointType &) override
typename InputImageType::PixelType InputImagePixelType
Extracts a path from a speed function between a start point and end point, which also passes near the...
typename InputImageType::RegionType InputImageRegionType
Abstraction of the Events used to communicating among filters and with GUIs.
A templated class holding a point in n-Dimensional image space.
typename InputImageType::ConstPointer InputImageConstPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52