ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkFastMarchingExtensionImageFilterBase.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkFastMarchingExtensionImageFilterBase_h
00019 #define __itkFastMarchingExtensionImageFilterBase_h
00020 
00021 #include "itkFastMarchingImageFilterBase.h"
00022 #include "itkVectorContainer.h"
00023 
00024 namespace itk
00025 {
00053 template< class TInput, class TOutput,
00054          typename TAuxValue,
00055          unsigned int VAuxDimension >
00056 class ITK_EXPORT FastMarchingExtensionImageFilterBase:
00057   public FastMarchingImageFilterBase< TInput, TOutput >
00058 {
00059 public:
00061   typedef FastMarchingExtensionImageFilterBase              Self;
00062   typedef FastMarchingImageFilterBase< TInput, TOutput >    Superclass;
00063   typedef SmartPointer< Self >                              Pointer;
00064   typedef SmartPointer< const Self >                        ConstPointer;
00065   typedef typename Superclass::Traits                       Traits;
00066 
00068   itkNewMacro(Self);
00069 
00071   itkTypeMacro(FastMarchingExtensionImageFilterBase,
00072                FastMarchingImageFilterBase);
00073 
00075   itkStaticConstMacro(ImageDimension, unsigned int,
00076                       Superclass::ImageDimension );
00077 
00079   itkStaticConstMacro(AuxDimension, unsigned int, VAuxDimension);
00080 
00082   typedef TAuxValue                                             AuxValueType;
00083   typedef Vector< AuxValueType, AuxDimension >                  AuxValueVectorType;
00084   typedef VectorContainer< IdentifierType, AuxValueVectorType > AuxValueContainerType;
00085 
00086   typedef typename AuxValueContainerType::Pointer       AuxValueContainerPointer;
00087   typedef typename AuxValueContainerType::ConstIterator AuxValueContainerConstIterator;
00088 
00089   typedef Image< AuxValueType, ImageDimension > AuxImageType;
00090   typedef typename AuxImageType::Pointer        AuxImagePointer;
00091 
00092 
00094   typedef typename Superclass::NodeType       NodeType;
00095   typedef typename Superclass::NodePairType   NodePairType;
00096 
00097 //  typedef typename Superclass::NodeContainerType          NodeContainerType;
00098 //  typedef typename Superclass::NodeContainerPointer       NodeContainerPointer;
00099 //  typedef typename Superclass::NodeContainerConstIterator NodeContainerConstIterator;
00100 
00101   typedef typename Superclass::NodePairContainerType    NodePairContainerType;
00102   typedef typename Superclass::NodePairContainerPointer NodePairContainerPointer;
00103   typedef typename Superclass::NodePairContainerConstIterator
00104     NodePairContainerConstIterator;
00105 
00106   typedef typename Superclass::OutputImageType        OutputImageType;
00107   typedef typename Superclass::OutputPixelType        OutputPixelType;
00108   typedef typename Superclass::InternalNodeStructure  InternalNodeStructure;
00109 
00111   AuxImageType * GetAuxiliaryImage( const unsigned int& idx );
00112 
00114   itkSetObjectMacro(AuxiliaryAliveValues, AuxValueContainerType );
00115   itkGetObjectMacro(AuxiliaryAliveValues, AuxValueContainerType );
00117 
00119   itkSetObjectMacro(AuxiliaryTrialValues, AuxValueContainerType );
00120   itkGetObjectMacro(AuxiliaryTrialValues, AuxValueContainerType );
00122 
00123 #ifdef ITK_USE_CONCEPT_CHECKING
00124 
00125   itkConceptMacro( AuxValueHasNumericTraitsCheck,
00126                    ( Concept::HasNumericTraits< TAuxValue > ) );
00127 
00129 #endif
00130 protected:
00131   FastMarchingExtensionImageFilterBase();
00132   ~FastMarchingExtensionImageFilterBase(){}
00133   void PrintSelf(std::ostream & os, Indent indent) const;
00135 
00136   virtual void InitializeOutput(OutputImageType *);
00137 
00138   virtual void UpdateValue( OutputImageType* oImage, const NodeType& iValue );
00139 
00141   virtual void GenerateOutputInformation();
00142 
00143   virtual void EnlargeOutputRequestedRegion(DataObject *output);
00144 
00145   AuxValueContainerPointer m_AuxiliaryAliveValues;
00146   AuxValueContainerPointer m_AuxiliaryTrialValues;
00147 
00148 private:
00149   FastMarchingExtensionImageFilterBase(const Self &); //purposely not implemented
00150   void operator=(const Self &);                   //purposely not implemented
00151 };
00152 } // namespace itk
00153 
00154 #include "itkFastMarchingExtensionImageFilterBase.hxx"
00155 #endif
00156