ITK  4.2.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  class TLevelSet,
55  class 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,
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 NULL;
112  }
113  else
114  {
115  return m_AuxImage[idx];
116  }
117  }
119 
122  itkGetObjectMacro(AuxInsideValues, AuxValueContainer);
123 
126  itkGetObjectMacro(AuxOutsideValues, AuxValueContainer);
127 protected:
130  void PrintSelf(std::ostream & os, Indent indent) const;
132 
133  virtual void Initialize();
134 
135  virtual double CalculateDistance(Index & index);
136 
137 private:
138  LevelSetVelocityNeighborhoodExtractor(const Self &); //purposely not
139  // implemented
140  void operator=(const Self &); //purposely not
141  // implemented
142 
145  AuxImageConstPointer m_AuxImage[VAuxDimension];
146 };
147 } // namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkLevelSetVelocityNeighborhoodExtractor.hxx"
151 #endif
152 
153 #endif
154