ITK  4.13.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:
75 
78 
80  itkNewMacro(Self);
81 
83  itkStaticConstMacro(InputImageDimension, unsigned int,
84  TInputImage::ImageDimension);
85 
87  typedef TInputImage InputImageType;
88  typedef typename InputImageType::Pointer InputImagePointer;
89  typedef typename InputImageType::ConstPointer InputImageConstPointer;
90  typedef typename InputImageType::RegionType InputImageRegionType;
91  typedef typename InputImageType::PixelType InputImagePixelType;
92 
94  typedef TOutputPath OutputPathType;
95  typedef typename OutputPathType::Pointer OutputPathPointer;
96  typedef typename OutputPathType::ConstPointer OutputPathConstPointer;
97 
99  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
102  typedef typename Superclass::CostFunctionType CostFunctionType;
103  typedef typename Superclass::OptimizerType OptimizerType;
104 
107 
112  void SetPathEndPoint( const PointType& ) ITK_OVERRIDE
113  {
114  itkWarningMacro("SetPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
115  }
116 
121  void AddPathEndPoint( const PointType& ) ITK_OVERRIDE
122  {
123  itkWarningMacro("AddPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
124  }
125 
130  void ClearPathEndPoints() ITK_OVERRIDE
131  {
132  itkWarningMacro("ClearPathEndPoints() is not valid for this filter. Use ClearPathInfo() instead.");
133  }
134 
138  {
139  m_Information.push_back( info );
140  }
141 
144  {
145  m_Information.clear( );
146  }
147 
149  virtual void Execute( const itk::Object * object, const itk::EventObject & event ) ITK_OVERRIDE;
150 
151 protected:
154  virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
155 
157  void GenerateData( void ) ITK_OVERRIDE;
158 
160  virtual unsigned int GetNumberOfPathsToExtract( ) const ITK_OVERRIDE;
161 
163  virtual InputImageType * ComputeArrivalFunction( ) ITK_OVERRIDE;
164 
166  virtual const PointType & GetNextEndPoint( ) ITK_OVERRIDE;
167 
168  std::vector< typename PathInformationType::Pointer > m_Information;
169  InputImagePointer m_CurrentArrivalFunction;
170 
171 private:
172  ITK_DISALLOW_COPY_AND_ASSIGN(SpeedFunctionToPathFilter);
173 
174 };
175 
176 } // end namespace itk
177 
178 #ifndef ITK_MANUAL_INSTANTIATION
179 #include "itkSpeedFunctionToPathFilter.hxx"
180 #endif
181 
182 #endif
PathInfo class for encapsulating information about a path for a SpeedFunctionToPathFilter Object...
InputImageType::RegionType InputImageRegionType
Light weight base class for most itk classes.
Extracts a path from a Fast Marching arrival function.
InputImageType::ConstPointer InputImageConstPointer
void AddPathEndPoint(const PointType &) override
OutputPathType::ConstPointer OutputPathConstPointer
InputImageType::Pointer InputImagePointer
SpeedFunctionPathInformation< PointType > PathInformationType
void AddPathInformation(PathInformationType *info)
void SetPathEndPoint(const PointType &) override
InputImageType::PixelType InputImagePixelType
Superclass::ContinuousIndexType ContinuousIndexType
Extracts a path from a speed function between a start point and end point, which also passes near the...
Abstraction of the Events used to communicating among filters and with GUIs.
ArrivalFunctionToPathFilter< TInputImage, TOutputPath > Superclass
Superclass::CostFunctionType CostFunctionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:59
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52