ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkFastMarchingImageToNodePairContainerAdaptor.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 
19 #ifndef itkFastMarchingImageToNodePairContainerAdaptor_h
20 #define itkFastMarchingImageToNodePairContainerAdaptor_h
21 
22 #include "itkObject.h"
23 #include "itkFastMarchingTraits.h"
24 
25 namespace itk
26 {
49 template< typename TInput, typename TOutput, typename TImage >
51  public Object
52  {
53 public:
58 
59 
61  itkNewMacro(Self);
62 
65 
67  typedef typename Traits::NodePairType NodePairType;
68  typedef typename Traits::NodePairContainerType NodePairContainerType;
69  typedef typename Traits::NodePairContainerPointer NodePairContainerPointer;
70  typedef typename Traits::LabelType LabelType;
71  typedef typename Traits::OutputPixelType OutputPixelType;
72 
73  typedef TImage ImageType;
74  typedef typename ImageType::Pointer ImagePointer;
75  typedef typename ImageType::ConstPointer ImageConstPointer;
76  typedef typename ImageType::PixelType ImagePixelType;
77 
78  itkStaticConstMacro( ImageDimension, unsigned int,
79  Traits::ImageDimension );
80 
84  void SetAliveImage( const ImageType* iImage );
85 
89  void SetTrialImage( const ImageType* iImage );
90 
101  void SetForbiddenImage( const ImageType* iImage );
102 
103  itkSetMacro( IsForbiddenImageBinaryMask, bool );
104  itkBooleanMacro( IsForbiddenImageBinaryMask );
105 
108 
111 
114 
115  itkSetMacro( AliveValue, OutputPixelType );
116  itkSetMacro( TrialValue, OutputPixelType );
117 
119  void Update();
120 
121 protected:
122 
125 
128 
132 
136 
139 
141 
142  virtual void GenerateData();
143 
145  void
146  SetPointsFromImage( const ImageType* image, const LabelType& iLabel,
147  const OutputPixelType& iValue );
148 
149 private:
150 
152  void operator = ( const Self& );
153 
154  };
155 }
156 
157 #include "itkFastMarchingImageToNodePairContainerAdaptor.hxx"
158 #endif // itkFastMarchingImageToNodePairContainerAdaptor_h
Light weight base class for most itk classes.
void SetTrialImage(const ImageType *iImage)
Set one Trial Image.
NodePairContainerType * GetAlivePoints()
Get resulting Alive Points container.
void SetPointsFromImage(const ImageType *image, const LabelType &iLabel, const OutputPixelType &iValue)
NodePairContainerType * GetTrialPoints()
Get resulting Trial Points container.
NodePairContainerType * GetForbiddenPoints()
Get resulting Forbidden Points container.
Convenient adaptor class which converts Image into FastMarching::NodePairContainerType used for initi...
Base class traits to be used by the FastMarchingBase.
Base class for most ITK classes.
Definition: itkObject.h:57
void SetForbiddenImage(const ImageType *iImage)
Set one Forbidden Image. There are two possible behaviors here depending on m_IsForbiddenImageBinaryM...
void SetAliveImage(const ImageType *iImage)
Set one Alive Image.