ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkExtensionVelocitiesImageFilter.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 itkExtensionVelocitiesImageFilter_h
19 #define itkExtensionVelocitiesImageFilter_h
20 
24 
25 namespace itk
26 {
49 template<
50  typename TLevelSet,
51  typename TAuxValue = float,
52  unsigned int VAuxDimension = 1
53  >
54 class ITK_TEMPLATE_EXPORT ExtensionVelocitiesImageFilter:
55  public ReinitializeLevelSetImageFilter< TLevelSet >
56 {
57 public:
58 
64 
66  itkNewMacro(Self);
67 
70 
76  typedef typename LevelSetType::NodeType NodeType;
79 
81  itkStaticConstMacro(SetDimension, unsigned int, LevelSetType::SetDimension);
82 
84  typedef AuxVarTypeDefault< TAuxValue, VAuxDimension,
85  itkGetStaticConstMacro(SetDimension) >
93 
95  itkStaticConstMacro(AuxDimension, unsigned int, VAuxDimension);
96 
98  void SetInputVelocityImage(const AuxImageType *ptr, unsigned int idx = 0);
99 
100  const AuxImageType * GetInputVelocityImage(unsigned int idx = 0);
101 
103  AuxImageType * GetOutputVelocityImage(unsigned int idx = 0);
104 
105 #ifdef ITK_USE_CONCEPT_CHECKING
106  // Begin concept checking
107  itkConceptMacro( AuxValueHasNumericTraitsCheck,
109  itkConceptMacro( LevelSetOStreamWritableCheck,
111  // End concept checking
112 #endif
113 
114 protected:
117 
118  virtual void GenerateDataFull() ITK_OVERRIDE;
119 
120  virtual void GenerateDataNarrowBand() ITK_OVERRIDE;
121 
122  virtual void AllocateOutput() ITK_OVERRIDE;
123 
124  virtual void EnlargeOutputRequestedRegion(DataObject *) ITK_OVERRIDE;
125 
126 private:
127  ITK_DISALLOW_COPY_AND_ASSIGN(ExtensionVelocitiesImageFilter);
128 
130  typedef Image< float, itkGetStaticConstMacro(SetDimension) > SpeedImageType;
131 
132  typedef LevelSetVelocityNeighborhoodExtractor< TLevelSet, TAuxValue, VAuxDimension > LocatorType;
133  typedef FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension,
134  SpeedImageType > FastMarchingImageFilterType;
135 
136  typename LocatorType::Pointer m_Locator;
137 
138  typename FastMarchingImageFilterType::Pointer m_Marcher;
139 };
140 } // namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 #include "itkExtensionVelocitiesImageFilter.hxx"
144 #endif
145 
146 #endif
Level set auxiliary variables type information.
Definition: itkLevelSet.h:89
Light weight base class for most itk classes.
TLevelSet::PixelType PixelType
Definition: itkLevelSet.h:55
Extend auxiliary variables smoothly using Fast Marching.
LevelSetType::NodeContainerPointer NodeContainerPointer
AuxVarType::AuxImageConstPointer AuxImageConstPointer
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
Extend velocities smoothly from a particular level set.
Represent a node in a level set.
TLevelSet::ConstPointer LevelSetConstPointer
Definition: itkLevelSet.h:52
LevelSetType::LevelSetConstPointer LevelSetConstPointer
ReinitializeLevelSetImageFilter< TLevelSet > Superclass
Reinitialize the level set to the signed distance function.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
#define itkConceptMacro(name, concept)
Level set type information.
Definition: itkLevelSet.h:40
Base class for all data objects in ITK.
AuxVarTypeDefault< TAuxValue, VAuxDimension, itkGetStaticConstMacro(SetDimension) > AuxVarType
Templated n-dimensional image class.
Definition: itkImage.h:75
TLevelSet::Pointer LevelSetPointer
Definition: itkLevelSet.h:51