ITK  6.0.0
Insight Toolkit
itkLevelSetVelocityNeighborhoodExtractor.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 itkLevelSetVelocityNeighborhoodExtractor_h
19#define itkLevelSetVelocityNeighborhoodExtractor_h
20
22
23namespace itk
24{
53template <typename TLevelSet, typename TAuxValue, unsigned int VAuxDimension = 1>
54class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor : public LevelSetNeighborhoodExtractor<TLevelSet>
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(LevelSetVelocityNeighborhoodExtractor);
58
64
66 itkNewMacro(Self);
67
69 itkOverrideGetNameOfClassMacro(LevelSetVelocityNeighborhoodExtractor);
70
73
75 static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
76
79
88
90 void
91 SetAuxImage(const AuxImageType * ptr, unsigned int idx = 0)
92 {
93 if (idx < VAuxDimension && m_AuxImage[idx] != ptr)
94 {
95 m_AuxImage[idx] = ptr;
96 }
97 this->Modified();
98 }
102 AuxImageConstPointer
103 GetAuxImage(unsigned int idx = 0)
104 {
105 if (idx >= VAuxDimension)
106 {
107 return nullptr;
108 }
109 else
110 {
111 return m_AuxImage[idx];
112 }
113 }
118 itkGetModifiableObjectMacro(AuxInsideValues, AuxValueContainer);
119
122 itkGetModifiableObjectMacro(AuxOutsideValues, AuxValueContainer);
123
124protected:
127 void
128 PrintSelf(std::ostream & os, Indent indent) const override;
129
130 void
131 Initialize() override;
132
133 double
134 CalculateDistance(Index & index) override;
135
136private:
137 typename AuxValueContainer::Pointer m_AuxInsideValues{};
138 typename AuxValueContainer::Pointer m_AuxOutsideValues{};
139 AuxImageConstPointer m_AuxImage[VAuxDimension]{};
140};
141} // namespace itk
142
143#ifndef ITK_MANUAL_INSTANTIATION
144# include "itkLevelSetVelocityNeighborhoodExtractor.hxx"
145#endif
146
147#endif
Level set auxiliary variables type information.
Definition: itkLevelSet.h:86
typename AuxImageType::ConstPointer AuxImageConstPointer
Definition: itkLevelSet.h:112
typename AuxImageType::Pointer AuxImagePointer
Definition: itkLevelSet.h:111
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Locate pixels of a particular level set.
Level set type information.
Definition: itkLevelSet.h:41
double CalculateDistance(Index &index) override
~LevelSetVelocityNeighborhoodExtractor() override=default
void SetAuxImage(const AuxImageType *ptr, unsigned int idx=0)
typename AuxVarType::AuxImageConstPointer AuxImageConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:69