ITK  6.0.0
Insight Toolkit
itkFastMarchingExtensionImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 {
55 template <typename TLevelSet,
56  typename TAuxValue,
57  unsigned int VAuxDimension = 1,
58  typename TSpeedImage = Image<float, TLevelSet::ImageDimension>>
59 class ITK_TEMPLATE_EXPORT FastMarchingExtensionImageFilter : public FastMarchingImageFilter<TLevelSet, TSpeedImage>
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_MOVE(FastMarchingExtensionImageFilter);
63 
69 
71  itkNewMacro(Self);
72 
74  itkOverrideGetNameOfClassMacro(FastMarchingExtensionImageFilter);
75 
77  using typename Superclass::LevelSetType;
78  using typename Superclass::SpeedImageType;
79  using typename Superclass::LevelSetImageType;
80 
82  static constexpr unsigned int SetDimension = Superclass::SetDimension;
83 
85  static constexpr unsigned int AuxDimension = VAuxDimension;
86 
94 
97 
99  AuxImageType *
100  GetAuxiliaryImage(unsigned int idx);
101 
103  void
105  {
106  m_AuxAliveValues = values;
107  }
108 
110  AuxValueContainer *
112  {
113  return m_AuxAliveValues.GetPointer();
114  }
115 
117  void
119  {
120  m_AuxTrialValues = values;
121  }
122 
126  {
127  return m_AuxTrialValues;
128  }
129 
130 #ifdef ITK_USE_CONCEPT_CHECKING
131  // Begin concept checking
132  itkConceptMacro(AuxValueHasNumericTraitsCheck, (Concept::HasNumericTraits<TAuxValue>));
133  // End concept checking
134 #endif
135 
136 protected:
138  ~FastMarchingExtensionImageFilter() override = default;
139  void
140  PrintSelf(std::ostream & os, Indent indent) const override;
141 
142  void
143  Initialize(LevelSetImageType *) override;
144 
145  double
146  UpdateValue(const IndexType & index, const SpeedImageType * speed, LevelSetImageType * output) override;
147 
149  void
150  GenerateOutputInformation() override;
151 
152  void
153  EnlargeOutputRequestedRegion(DataObject * output) override;
154 
155 private:
156  typename AuxValueContainer::Pointer m_AuxAliveValues{};
157  typename AuxValueContainer::Pointer m_AuxTrialValues{};
158 
159  AuxImageType * m_AuxImages[AuxDimension]{};
160 };
161 } // namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 # include "itkFastMarchingExtensionImageFilter.hxx"
165 #endif
166 
167 #endif
itk::FastMarchingExtensionImageFilter
Extend auxiliary variables smoothly using Fast Marching.
Definition: itkFastMarchingExtensionImageFilter.h:59
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::FastMarchingExtensionImageFilter::AuxImagePointer
typename AuxVarType::AuxImagePointer AuxImagePointer
Definition: itkFastMarchingExtensionImageFilter.h:93
itk::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:68
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:717
itk::detail::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:51
itk::FastMarchingExtensionImageFilter::GetAuxiliaryAliveValues
AuxValueContainer * GetAuxiliaryAliveValues()
Definition: itkFastMarchingExtensionImageFilter.h:111
itk::FastMarchingExtensionImageFilter::AuxValueVectorType
typename AuxVarType::AuxValueVectorType AuxValueVectorType
Definition: itkFastMarchingExtensionImageFilter.h:90
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FastMarchingExtensionImageFilter::AuxValueContainer
typename AuxVarType::AuxValueContainer AuxValueContainer
Definition: itkFastMarchingExtensionImageFilter.h:91
itkFastMarchingImageFilter.h
itk::FastMarchingExtensionImageFilter::GetAuxiliaryTrialValues
AuxValueContainer::Pointer GetAuxiliaryTrialValues()
Definition: itkFastMarchingExtensionImageFilter.h:125
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::AuxVarTypeDefault::AuxImagePointer
typename AuxImageType::Pointer AuxImagePointer
Definition: itkLevelSet.h:111
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::FastMarchingImageFilter
Solve an Eikonal equation using Fast Marching.
Definition: itkFastMarchingImageFilter.h:135
itk::AuxVarTypeDefault::AuxValueType
TPixel AuxValueType
Definition: itkLevelSet.h:93
itk::AuxVarTypeDefault
Level set auxiliary variables type information.
Definition: itkLevelSet.h:85
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::FastMarchingExtensionImageFilter::AuxImageType
typename AuxVarType::AuxImageType AuxImageType
Definition: itkFastMarchingExtensionImageFilter.h:92
itk::FastMarchingExtensionImageFilter::SetAuxiliaryTrialValues
void SetAuxiliaryTrialValues(AuxValueContainer *values)
Definition: itkFastMarchingExtensionImageFilter.h:118
itk::FastMarchingExtensionImageFilter::SetAuxiliaryAliveValues
void SetAuxiliaryAliveValues(AuxValueContainer *values)
Definition: itkFastMarchingExtensionImageFilter.h:104
itk::FastMarchingExtensionImageFilter::AuxValueType
typename AuxVarType::AuxValueType AuxValueType
Definition: itkFastMarchingExtensionImageFilter.h:89
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293