ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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{
51template <typename TLevelSet, typename TAuxValue, unsigned int VAuxDimension = 1>
52class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor : public LevelSetNeighborhoodExtractor<TLevelSet>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(LevelSetVelocityNeighborhoodExtractor);
56
62
64 itkNewMacro(Self);
65
67 itkOverrideGetNameOfClassMacro(LevelSetVelocityNeighborhoodExtractor);
68
71
73 static constexpr unsigned int SetDimension = LevelSetType::SetDimension;
74
77
86
88 void
89 SetAuxImage(const AuxImageType * ptr, unsigned int idx = 0)
90 {
91 if (idx < VAuxDimension && m_AuxImage[idx] != ptr)
92 {
93 m_AuxImage[idx] = ptr;
94 }
95 this->Modified();
96 }
97
98
100 AuxImageConstPointer
101 GetAuxImage(unsigned int idx = 0)
102 {
103 if (idx >= VAuxDimension)
104 {
105 return nullptr;
106 }
107
108 return m_AuxImage[idx];
109 }
110
113 itkGetModifiableObjectMacro(AuxInsideValues, AuxValueContainer);
114
117 itkGetModifiableObjectMacro(AuxOutsideValues, AuxValueContainer);
118
119protected:
122 void
123 PrintSelf(std::ostream & os, Indent indent) const override;
124
125 void
126 Initialize() override;
127
128 double
129 CalculateDistance(Index & index) override;
130
131private:
132 typename AuxValueContainer::Pointer m_AuxInsideValues{};
133 typename AuxValueContainer::Pointer m_AuxOutsideValues{};
135};
136} // namespace itk
137
138#ifndef ITK_MANUAL_INSTANTIATION
139# include "itkLevelSetVelocityNeighborhoodExtractor.hxx"
140#endif
141
142#endif
Level set auxiliary variables type information.
Definition itkLevelSet.h:86
VectorContainer< unsigned int, AuxValueVectorType > AuxValueContainer
Control indentation during Print() invocation.
Definition itkIndent.h:50
Level set type information.
Definition itkLevelSet.h:41
static constexpr unsigned int SetDimension
Definition itkLevelSet.h:48
double CalculateDistance(Index &index) override
~LevelSetVelocityNeighborhoodExtractor() override=default
void SetAuxImage(const AuxImageType *ptr, unsigned int idx=0)
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void Modified() const
Implements transparent reference counting.
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