ITK  5.0.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 {
54 template<
55  typename TLevelSet,
56  typename TAuxValue,
57  unsigned int VAuxDimension = 1,
58  typename TSpeedImage = Image< float, TLevelSet ::ImageDimension >
59  >
60 class ITK_TEMPLATE_EXPORT FastMarchingExtensionImageFilter:
61  public FastMarchingImageFilter< TLevelSet, TSpeedImage >
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_ASSIGN(FastMarchingExtensionImageFilter);
65 
71 
73  itkNewMacro(Self);
74 
77 
79  using LevelSetType = typename Superclass::LevelSetType;
80  using SpeedImageType = typename Superclass::SpeedImageType;
81  using LevelSetImageType = typename Superclass::LevelSetImageType;
82 
84  static constexpr unsigned int SetDimension = Superclass::SetDimension;
85 
87  static constexpr unsigned int AuxDimension = VAuxDimension;
88 
90  using AuxVarType = AuxVarTypeDefault< TAuxValue,
91  Self::AuxDimension,
92  Self::SetDimension >;
98 
101 
103  AuxImageType * GetAuxiliaryImage(unsigned int idx);
104 
107  {
108  m_AuxAliveValues = values;
109  }
110 
113  {
114  return m_AuxAliveValues.GetPointer();
115  }
116 
119  {
120  m_AuxTrialValues = values;
121  }
122 
124  typename AuxValueContainer::Pointer GetAuxiliaryTrialValues()
125  {
126  return m_AuxTrialValues;
127  }
128 
129 #ifdef ITK_USE_CONCEPT_CHECKING
130  // Begin concept checking
131  itkConceptMacro( AuxValueHasNumericTraitsCheck,
133  // End concept checking
134 #endif
135 
136 protected:
138  ~FastMarchingExtensionImageFilter() override = default;
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
141  void Initialize(LevelSetImageType *) override;
142 
143  double UpdateValue(const IndexType & index,
144  const SpeedImageType *speed, LevelSetImageType *output) override;
145 
147  void GenerateOutputInformation() override;
148 
149  void EnlargeOutputRequestedRegion(DataObject *output) override;
150 
151 private:
152  typename AuxValueContainer::Pointer m_AuxAliveValues;
153  typename AuxValueContainer::Pointer m_AuxTrialValues;
154 
155  AuxImageType *m_AuxImages[AuxDimension];
156 };
157 } // namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkFastMarchingExtensionImageFilter.hxx"
161 #endif
162 
163 #endif
typename AuxVarType::AuxValueContainer AuxValueContainer
Level set auxiliary variables type information.
Definition: itkLevelSet.h:89
Light weight base class for most itk classes.
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
Extend auxiliary variables smoothly using Fast Marching.
typename AuxImageType::Pointer AuxImagePointer
Definition: itkLevelSet.h:114
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
typename AuxVarType::AuxImagePointer AuxImagePointer
typename Superclass::LevelSetImageType LevelSetImageType
typename Superclass::SpeedImageType SpeedImageType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename AuxVarType::AuxValueVectorType AuxValueVectorType
Solve an Eikonal equation using Fast Marching.
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75