ITK  5.4.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 
23 namespace itk
24 {
53 template <typename TLevelSet, typename TAuxValue, unsigned int VAuxDimension = 1>
54 class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor : public LevelSetNeighborhoodExtractor<TLevelSet>
55 {
56 public:
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 
124 protected:
126  ~LevelSetVelocityNeighborhoodExtractor() override = default;
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 
136 private:
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
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::LevelSetTypeDefault
Level set type information.
Definition: itkLevelSet.h:40
itk::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:70
itk::LevelSetVelocityNeighborhoodExtractor
Locate pixels of a particular level set.
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:54
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::LevelSetVelocityNeighborhoodExtractor::GetAuxImage
AuxImageConstPointer GetAuxImage(unsigned int idx=0)
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:103
itk::LevelSetVelocityNeighborhoodExtractor::SetAuxImage
void SetAuxImage(const AuxImageType *ptr, unsigned int idx=0)
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:91
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LevelSetVelocityNeighborhoodExtractor::AuxImageConstPointer
typename AuxVarType::AuxImageConstPointer AuxImageConstPointer
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:87
itk::AuxVarTypeDefault::AuxImagePointer
typename AuxImageType::Pointer AuxImagePointer
Definition: itkLevelSet.h:111
itk::LevelSetVelocityNeighborhoodExtractor::AuxValueContainer
typename AuxVarType::AuxValueContainer AuxValueContainer
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:84
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::AuxVarTypeDefault::AuxValueType
TPixel AuxValueType
Definition: itkLevelSet.h:93
itk::AuxVarTypeDefault
Level set auxiliary variables type information.
Definition: itkLevelSet.h:85
itk::LevelSetVelocityNeighborhoodExtractor::AuxValueVectorType
typename AuxVarType::AuxValueVectorType AuxValueVectorType
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:83
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::LevelSetVelocityNeighborhoodExtractor::AuxImagePointer
typename AuxVarType::AuxImagePointer AuxImagePointer
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:86
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::LevelSetVelocityNeighborhoodExtractor::AuxImageType
typename AuxVarType::AuxImageType AuxImageType
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:85
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itkLevelSetNeighborhoodExtractor.h
itk::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:48
itk::LevelSetVelocityNeighborhoodExtractor::AuxValueType
typename AuxVarType::AuxValueType AuxValueType
Definition: itkLevelSetVelocityNeighborhoodExtractor.h:82
itk::LevelSetNeighborhoodExtractor
Locate pixels of a particular level set.
Definition: itkLevelSetNeighborhoodExtractor.h:57
itk::AuxVarTypeDefault::AuxImageConstPointer
typename AuxImageType::ConstPointer AuxImageConstPointer
Definition: itkLevelSet.h:112