ITK  4.9.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;
100  typedef typename Superclass::IndexType IndexType;
101  typedef typename Superclass::PointType PointType;
102  typedef typename Superclass::CostFunctionType CostFunctionType;
103  typedef typename Superclass::OptimizerType OptimizerType;
104 
107 
112  void SetPathEndPoint( const PointType& )
113  {
114  itkWarningMacro("SetPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
115  }
116 
121  void AddPathEndPoint( const PointType& )
122  {
123  itkWarningMacro("AddPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
124  }
125 
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 );
150 
151 protected:
154  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
155 
157  void GenerateData( void );
158 
160  virtual unsigned int GetNumberOfPathsToExtract( ) const;
161 
163  virtual InputImageType * ComputeArrivalFunction( );
164 
166  virtual const PointType & GetNextEndPoint( );
167 
168  std::vector< typename PathInformationType::Pointer > m_Information;
170 
171 private:
172  SpeedFunctionToPathFilter( const Self& ); //purposely not implemented
173  void operator=( const Self& ); //purposely not implemented
174 
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...
InputImageType::RegionType InputImageRegionType
Light weight base class for most itk classes.
Extracts a path from a Fast Marching arrival function.
InputImageType::ConstPointer InputImageConstPointer
std::vector< typename PathInformationType::Pointer > m_Information
OutputPathType::ConstPointer OutputPathConstPointer
InputImageType::Pointer InputImagePointer
SpeedFunctionPathInformation< PointType > PathInformationType
void AddPathInformation(PathInformationType *info)
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:57
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52