ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSpeedFunctionPathInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSpeedFunctionPathInformation.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 itkSpeedFunctionPathInformation_h
18 #define itkSpeedFunctionPathInformation_h
19 
20 #include "itkLightObject.h"
21 #include "itkObjectFactory.h"
22 
23 #include <vector>
24 
25 namespace itk
26 {
27 
51 template <typename TPoint>
53  public LightObject
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(SpeedFunctionPathInformation);
57 
63 
64 
67 
69  itkNewMacro(Self);
70 
72  using PointType = TPoint;
73  using PointsContainerType = std::vector< PointType >;
74 
75  void ClearInfo();
76 
77  void SetStartPoint( const PointType & start );
78 
79  void SetEndPoint( const PointType & end );
80 
81  void AddWayPoint( const PointType & way );
82 
83 
85  void SetStartPoint( const PointsContainerType & start );
86 
87  void SetEndPoint( const PointsContainerType & end );
88 
89  void AddWayPoint( const PointsContainerType & way );
90 
91  // methods for modifying path seeds - needed when using
92  // an extended seed.
93  void SetCurrent( const PointsContainerType & newcurrent );
94  void SetPrevious( const PointsContainerType & newprevious );
95  void SetNext( const PointsContainerType & newnext );
96 
97  void SetCurrent( const PointType & current );
98  void SetPrevious( const PointType & newprevious );
99  void SetNext( const PointType & newnext );
100 
101  void Advance();
102 
103  unsigned int GetNumberOfPoints( ) const;
104 
105  const PointsContainerType & GetStartPoint( ) const;
106 
107  const PointsContainerType & GetEndPoint( ) const;
108 
109  const PointsContainerType & GetWayPoint( SizeValueType i ) const;
110 
111  bool HasNextFront( ) const;
112 
114 
115  const PointsContainerType & PeekCurrentFront( ) const;
116 
117  const PointsContainerType & PeekNextFront( ) const;
118 
119  const PointsContainerType & PeekPreviousFront( ) const;
120 
121 
122 protected:
124  ~SpeedFunctionPathInformation( ) override;
125  void PrintSelf( std::ostream& os, Indent indent ) const override;
126 
127  std::vector< PointsContainerType > m_Information;
129 
130 
132  {
133  PointsContainerType V(1);
134  V[0]=P;
135  return(V);
136  }
137 };
138 
139 
140 } // end namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 #include "itkSpeedFunctionPathInformation.hxx"
144 #endif
145 
146 #endif
PathInfo class for encapsulating information about a path for a SpeedFunctionToPathFilter Object...
Light weight base class for most itk classes.
void SetNext(const PointsContainerType &newnext)
void SetStartPoint(const PointType &start)
PointsContainerType PtoPVec(const PointType &P)
unsigned long SizeValueType
Definition: itkIntTypes.h:83
const PointsContainerType & PeekCurrentFront() const
const PointsContainerType & PeekNextFront() const
void PrintSelf(std::ostream &os, Indent indent) const override
void SetEndPoint(const PointType &end)
const PointsContainerType & GetCurrentFrontAndAdvance()
void SetCurrent(const PointsContainerType &newcurrent)
const PointsContainerType & PeekPreviousFront() const
const PointsContainerType & GetWayPoint(SizeValueType i) const
void SetPrevious(const PointsContainerType &newprevious)
const PointsContainerType & GetStartPoint() const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
unsigned int GetNumberOfPoints() const
const PointsContainerType & GetEndPoint() const
void AddWayPoint(const PointType &way)
std::vector< PointsContainerType > m_Information