ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkLevelSetVelocityNeighborhoodExtractor.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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<
54  typename TLevelSet,
55  typename TAuxValue,
56  unsigned int VAuxDimension = 1
57  >
58 class ITK_TEMPLATE_EXPORT LevelSetVelocityNeighborhoodExtractor:
59  public LevelSetNeighborhoodExtractor< TLevelSet >
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
74 
77 
79  itkStaticConstMacro(SetDimension, unsigned int,
80  LevelSetType::SetDimension);
81 
83  typedef::itk::Index< itkGetStaticConstMacro(SetDimension) > Index;
84 
94 
96  void SetAuxImage(const AuxImageType *ptr, unsigned int idx = 0)
97  {
98  if ( idx < VAuxDimension && m_AuxImage[idx] != ptr )
99  {
100  m_AuxImage[idx] = ptr;
101  }
102  this->Modified();
103  }
105 
107  AuxImageConstPointer GetAuxImage(unsigned int idx = 0)
108  {
109  if ( idx >= VAuxDimension )
110  {
111  return ITK_NULLPTR;
112  }
113  else
114  {
115  return m_AuxImage[idx];
116  }
117  }
119 
122  itkGetModifiableObjectMacro(AuxInsideValues, AuxValueContainer);
123 
126  itkGetModifiableObjectMacro(AuxOutsideValues, AuxValueContainer);
127 
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
133  virtual void Initialize() ITK_OVERRIDE;
134 
135  virtual double CalculateDistance(Index & index) ITK_OVERRIDE;
136 
137 private:
138  ITK_DISALLOW_COPY_AND_ASSIGN(LevelSetVelocityNeighborhoodExtractor);
139 
140  typename AuxValueContainer::Pointer m_AuxInsideValues;
141  typename AuxValueContainer::Pointer m_AuxOutsideValues;
142  AuxImageConstPointer m_AuxImage[VAuxDimension];
143 };
144 } // namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkLevelSetVelocityNeighborhoodExtractor.hxx"
148 #endif
149 
150 #endif
Level set auxiliary variables type information.
Definition: itkLevelSet.h:89
Locate pixels of a particular level set.
void SetAuxImage(const AuxImageType *ptr, unsigned int idx=0)
Light weight base class for most itk classes.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
AuxVarTypeDefault< TAuxValue, VAuxDimension, itkGetStaticConstMacro(SetDimension) > AuxVarType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typedef::itk::Index< itkGetStaticConstMacro(SetDimension) > Index
Level set type information.
Definition: itkLevelSet.h:40
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:72
Templated n-dimensional image class.
Definition: itkImage.h:75