ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSpeedFunctionToPathFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkSpeedFunctionToPathFilter_h
19#define itkSpeedFunctionToPathFilter_h
20
23
24namespace itk
25{
26
66template <typename TInputImage, typename TOutputPath = PolyLineParametricPath<TInputImage::ImageDimension>>
67class ITK_TEMPLATE_EXPORT SpeedFunctionToPathFilter : public ArrivalFunctionToPathFilter<TInputImage, TOutputPath>
68{
69public:
70 ITK_DISALLOW_COPY_AND_MOVE(SpeedFunctionToPathFilter);
71
77
79 itkOverrideGetNameOfClassMacro(SpeedFunctionToPathFilter);
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;
91 using InputImageRegionType = typename InputImageType::RegionType;
92 using InputImagePixelType = typename InputImageType::PixelType;
93
95 using OutputPathType = TOutputPath;
96 using OutputPathPointer = typename OutputPathType::Pointer;
97 using OutputPathConstPointer = typename OutputPathType::ConstPointer;
98
105
109
114 void
115 SetPathEndPoint(const PointType &) override
116 {
117 itkWarningMacro("SetPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
118 }
119
124 void
125 AddPathEndPoint(const PointType &) override
126 {
127 itkWarningMacro("AddPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
128 }
129
134 void
136 {
137 itkWarningMacro("ClearPathEndPoints() is not valid for this filter. Use ClearPathInfo() instead.");
138 }
139
142 void
144 {
145 m_Information.push_back(info);
146 }
147
149 void
151 {
152 m_Information.clear();
153 }
154
156 void
157 Execute(const itk::Object * object, const itk::EventObject & event) override;
158
160 itkGetConstMacro(CurrentArrivalFunction, InputImagePointer);
161
162protected:
165 void
166 PrintSelf(std::ostream & os, Indent indent) const override;
167
169 void
170 GenerateData() override;
171
173 unsigned int
175
179
181 const PointsContainerType &
182 GetNextEndPoint() override;
183
184 std::vector<typename PathInformationType::Pointer> m_Information;
186};
187
188} // end namespace itk
189
190#ifndef ITK_MANUAL_INSTANTIATION
191# include "itkSpeedFunctionToPathFilter.hxx"
192#endif
193
194#endif
Abstraction of the Events used to communicating among filters and with GUIs.
Control indentation during Print() invocation.
Definition itkIndent.h:53
Base class for most ITK classes.
Definition itkObject.h:62
Implements transparent reference counting.
PathInfo class for encapsulating information about a path for a SpeedFunctionToPathFilter Object....
typename Superclass::IndexType IndexType
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputPathType::Pointer OutputPathPointer
void AddPathInformation(PathInformationType *info)
void Execute(const itk::Object *object, const itk::EventObject &event) override
typename InputImageType::PixelType InputImagePixelType
typename PathInformationType::PointsContainerType PointsContainerType
typename InputImageType::Pointer InputImagePointer
unsigned int GetNumberOfPathsToExtract() const override
typename Superclass::OptimizerType OptimizerType
const PointsContainerType & GetNextEndPoint() override
void PrintSelf(std::ostream &os, Indent indent) const override
typename Superclass::CostFunctionType CostFunctionType
typename Superclass::PointType PointType
void SetPathEndPoint(const PointType &) override
InputImageType * ComputeArrivalFunction() override
typename Superclass::ContinuousIndexType ContinuousIndexType
ArrivalFunctionToPathFilter< TInputImage, TOutputPath > Superclass
void AddPathEndPoint(const PointType &) override
typename InputImageType::RegionType InputImageRegionType
static constexpr unsigned int InputImageDimension
std::vector< typename PathInformationType::Pointer > m_Information
typename OutputPathType::ConstPointer OutputPathConstPointer
SpeedFunctionPathInformation< PointType > PathInformationType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....