ITK  4.9.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  >
59  public LevelSetNeighborhoodExtractor< TLevelSet >
60 {
61 public:
67 
69  itkNewMacro(Self);
70 
74 
77 
79  itkStaticConstMacro(SetDimension, unsigned int,
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  LevelSetVelocityNeighborhoodExtractor(const Self &) ITK_DELETE_FUNCTION;
139  void operator=(const Self &) ITK_DELETE_FUNCTION;
140 
144 };
145 } // namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 #include "itkLevelSetVelocityNeighborhoodExtractor.hxx"
149 #endif
150 
151 #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.
virtual double CalculateDistance(Index &index) override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
virtual void Modified() const
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
void PrintSelf(std::ostream &os, Indent indent) const override
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:71
static const unsigned int SetDimension
Definition: itkLevelSet.h:48
Templated n-dimensional image class.
Definition: itkImage.h:75