ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkScalarRegionBasedLevelSetFunction.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 __itkScalarRegionBasedLevelSetFunction_h
19 #define __itkScalarRegionBasedLevelSetFunction_h
20 
25 
26 namespace itk
27 {
65 template< typename TInputImage, typename TFeatureImage, typename TSharedData >
67  public RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData >
68 {
69 public:
74 
75  // itkNewMacro() is purposely not provided since this is an abstract class.
76 
79 
80  itkStaticConstMacro(ImageDimension, unsigned int, TFeatureImage::ImageDimension);
81 
92 
94  typedef typename FeatureImageType::ConstPointer FeatureImageConstPointer;
98 
104  typedef typename Superclass::GlobalDataStruct GlobalDataStruct;
107 
110 
115 
116  typedef std::list< unsigned int > ListPixelType;
117  typedef typename ListPixelType::const_iterator ListPixelConstIterator;
118  typedef typename ListPixelType::iterator ListPixelIterator;
121 
126  void UpdatePixel(const unsigned int & idx,
128  InputPixelType & newValue,
129  bool & status);
130 
131 protected:
134 
136  ScalarValueType & product);
137 
138  // update the background and foreground constants for pixel updates
139  // Called only when sparse filters are used to prevent iteration through the
140  // entire image
141  virtual void UpdateSharedDataInsideParameters(const unsigned int & iId,
142  const FeaturePixelType & iVal, const ScalarValueType & iChange) = 0;
143 
144  virtual void UpdateSharedDataOutsideParameters(const unsigned int & iId,
145  const FeaturePixelType & iVal, const ScalarValueType & iChange) = 0;
146 
147 private:
148  ScalarRegionBasedLevelSetFunction(const Self &); //purposely not implemented
149  void operator=(const Self &); //purposely not implemented
150 };
151 }
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkScalarRegionBasedLevelSetFunction.hxx"
155 #endif
156 
157 #endif
RegionBasedLevelSetFunction< TInputImage, TFeatureImage, TSharedData > Superclass
ImageRegionIteratorWithIndex< InputImageType > ImageIteratorType
ScalarValueType ComputeOverlapParameters(const FeatureIndexType &featIndex, ScalarValueType &product)
virtual void UpdateSharedDataInsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:50
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
Image< ListPixelType, itkGetStaticConstMacro(ImageDimension) > ListImageType
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
LevelSet function that computes a speed image based on regional integrals.
virtual void UpdateSharedDataOutsideParameters(const unsigned int &iId, const FeaturePixelType &iVal, const ScalarValueType &iChange)=0
Superclass::InputImageConstPointer InputImageConstPointer
ImageRegionConstIteratorWithIndex< InputImageType > ConstImageIteratorType
void UpdatePixel(const unsigned int &idx, NeighborhoodIterator< TInputImage > &iterator, InputPixelType &newValue, bool &status)
Performs the narrow-band update of the Heaviside function for each voxel. The characteristic function...
ImageRegionConstIterator< FeatureImageType > ConstFeatureIteratorType
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Templated n-dimensional image class.
Definition: itkImage.h:75
LevelSet function that computes a speed image based on regional integrals.
ImageRegionIteratorWithIndex< FeatureImageType > FeatureImageIteratorType