ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkFastMarchingExtensionImageFilter.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 __itkFastMarchingExtensionImageFilter_h
19 #define __itkFastMarchingExtensionImageFilter_h
20 
22 
23 namespace itk
24 {
51 template<
52  class TLevelSet,
53  class TAuxValue,
54  unsigned int VAuxDimension = 1,
55  class TSpeedImage = Image< float, TLevelSet ::ImageDimension >
56  >
58  public FastMarchingImageFilter< TLevelSet, TSpeedImage >
59 {
60 public:
66 
68  itkNewMacro(Self);
69 
72 
74  typedef typename Superclass::LevelSetType LevelSetType;
75  typedef typename Superclass::SpeedImageType SpeedImageType;
76  typedef typename Superclass::LevelSetImageType LevelSetImageType;
77 
79  itkStaticConstMacro(SetDimension, unsigned int, Superclass::SetDimension);
80 
82  itkStaticConstMacro(AuxDimension, unsigned int, VAuxDimension);
83 
85  typedef AuxVarTypeDefault< TAuxValue,
86  itkGetStaticConstMacro(AuxDimension),
87  itkGetStaticConstMacro(SetDimension) >
95 
98 
100  AuxImageType * GetAuxiliaryImage(unsigned int idx);
101 
103  void SetAuxiliaryAliveValues(AuxValueContainer *values)
104  {
105  m_AuxAliveValues = values;
106  }
107 
109  AuxValueContainer * GetAuxiliaryAliveValues(void)
110  {
111  return m_AuxAliveValues.GetPointer();
112  }
113 
115  void SetAuxiliaryTrialValues(AuxValueContainer *values)
116  {
117  m_AuxTrialValues = values;
118  }
119 
121  typename AuxValueContainer::Pointer GetAuxiliaryTrialValues()
122  {
123  return m_AuxTrialValues;
124  }
125 
126 #ifdef ITK_USE_CONCEPT_CHECKING
127 
128  itkConceptMacro( AuxValueHasNumericTraitsCheck,
130 
132 #endif
133 
134 protected:
137  void PrintSelf(std::ostream & os, Indent indent) const;
138 
139  virtual void Initialize(LevelSetImageType *);
140 
141  virtual double UpdateValue(const IndexType & index,
142  const SpeedImageType *speed, LevelSetImageType *output);
143 
145  virtual void GenerateOutputInformation();
146 
147  virtual void EnlargeOutputRequestedRegion(DataObject *output);
148 
149 private:
150  FastMarchingExtensionImageFilter(const Self &); //purposely not implemented
151  void operator=(const Self &); //purposely not implemented
152 
155 
156  AuxImageType *m_AuxImages[AuxDimension];
157 };
158 } // namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkFastMarchingExtensionImageFilter.hxx"
162 #endif
163 
164 #endif
165