Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkMedialNodePairCorrespondenceProcess.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMedialNodePairCorrespondenceProcess.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-05-12 17:26:20 $
00007   Version:   $Revision: 1.6 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkMedialNodePairCorrespondenceProcess_h
00018 #define __itkMedialNodePairCorrespondenceProcess_h
00019 
00020 #include "itkImage.h"
00021 #include "itkProcessObject.h"
00022 #include "itkDataObject.h"
00023 #include "itkBloxCoreAtomImage.h"
00024 #include "itkBloxCoreAtomPixel.h"
00025 #include "itkMatrixResizeableDataObject.h"
00026 #include "itkBinaryMedialNodeMetric.h"
00027 
00028 #include "itkCorrespondenceDataStructure.h"
00029 #include "itkSecondaryNodeList.h"
00030 #include "itkCorrespondingList.h"
00031 #include "itkCorrespondingMedialNodeClique.h"
00032 #include "itkCorrespondenceDataStructureIterator.h"
00033 
00034 namespace itk
00035 {
00036   
00045 template< typename TSourceImage >
00046 class ITK_EXPORT MedialNodePairCorrespondenceProcess : public ProcessObject
00047 {
00048 public:
00050   itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
00051 
00053   typedef MedialNodePairCorrespondenceProcess Self;
00054   typedef ProcessObject                       Superclass;
00055   typedef SmartPointer<Self>                  Pointer;
00056   typedef SmartPointer<const Self>            ConstPointer;
00057 
00059   typedef DataObject::Pointer DataObjectPointer;
00060 
00062   itkNewMacro(Self);
00063 
00065   itkTypeMacro(MedialNodePairCorrespondenceProcess, ProcessObject);
00066 
00068   typedef TSourceImage                             CoreAtomImageType;
00069   typedef typename CoreAtomImageType::Pointer      CoreAtomImagePointer;
00070   typedef typename CoreAtomImageType::RegionType   CoreAtomImageRegionType; 
00071   typedef typename CoreAtomImageType::PixelType    CoreAtomImagePixelType; 
00072   typedef typename CoreAtomImageType::ConstPointer CoreAtomImageConstPointer;
00073 
00075   typedef MatrixResizeableDataObject<double>   DistanceMatrixType;
00076   typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
00077 
00079   typedef MatrixResizeableDataObject<double>         CorrespondenceMatrixType;
00080   typedef typename CorrespondenceMatrixType::Pointer CorrespondenceMatrixPointer;
00081 
00083   typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),2> NodeType;
00084   typedef CorrespondenceDataStructure<NodeType,2> DataStructureType;
00085   typedef typename CorrespondenceDataStructure<NodeType,2>::Pointer DataStructurePointerType;
00086   typedef CorrespondenceDataStructureIterator<DataStructureType> IteratorType;
00088 
00090   typedef BinaryMedialNodeMetric<itkGetStaticConstMacro(NDimensions)> BinaryMetricType;
00091   typedef typename BinaryMedialNodeMetric<itkGetStaticConstMacro(NDimensions)>::Pointer BinaryMetricPointer;
00093 
00095   typedef BloxCoreAtomPixel<itkGetStaticConstMacro(NDimensions)> MedialNodeType;
00096 
00098   typedef Point<double, itkGetStaticConstMacro(NDimensions)> PositionType;
00099 
00101   DataStructureType * GetOutput(void);
00102   DataStructureType * GetOutput(unsigned int idx);
00104 
00105   /* This is important to note...the inputs for this process are somewhat 
00106      complicated, and there are a lot of them.  You need all 5 inputs for 
00107      this process to perform its task */
00108 
00110   void SetCoreAtomImageA( const CoreAtomImageType * CoreAtomImageA );
00111 
00113   void SetCoreAtomImageB( const CoreAtomImageType * CoreAtomImageB );
00114 
00116   void SetDistanceMatrixA( const DistanceMatrixType * DistanceMatrixA );
00117 
00119   void SetDistanceMatrixB( const DistanceMatrixType * DistanceMatrixB );
00120 
00122   int GetNumberOfNodePairs() {return m_NumberOfNodePairs;}  
00123 
00125   int GetNumberOfNodeBasePairs() {return m_NumberOfNodeBasePairs;}  
00126 
00128   void SetCorrespondenceMatrix( const CorrespondenceMatrixType * CorrespondenceMatrix );
00129 
00130   virtual void Update() {this->GenerateData();}
00131 
00132   virtual DataObjectPointer MakeOutput(unsigned int idx);
00133 
00134 protected:
00135   MedialNodePairCorrespondenceProcess();
00136   virtual ~MedialNodePairCorrespondenceProcess(){} 
00137 
00138   void PrintSelf(std::ostream& os, Indent indent) const;
00139 
00141   void GenerateData();
00142 
00144   TSourceImage * GetCoreAtomImageA();
00145   TSourceImage * GetCoreAtomImageB();
00147 
00149   DistanceMatrixType * GetDistanceMatrixA();
00150   DistanceMatrixType * GetDistanceMatrixB();
00152 
00154   CorrespondenceMatrixType * GetCorrespondenceMatrix();
00155 
00156 private:
00157   MedialNodePairCorrespondenceProcess(const Self&); //purposely not implemented
00158   void operator=(const Self&); //purposely not implemented
00159 
00160   CoreAtomImagePointer m_CoreAtomImageA;
00161   CoreAtomImagePointer m_CoreAtomImageB;
00162 
00163   DistanceMatrixPointer m_DistanceMatrixA;
00164   DistanceMatrixPointer m_DistanceMatrixB;
00165 
00166   CorrespondenceMatrixPointer m_CorrespondenceMatrix;
00167 
00168   DataStructurePointerType m_DataStructure;
00169 
00170   BinaryMetricPointer m_BinaryMetric;
00171 
00172   int m_Rows;
00173   int m_Columns;
00174 
00175   int m_NumberOfNodePairs;
00176   int m_NumberOfNodeBasePairs;
00177 
00178 };
00179 
00180 } // end namespace itk
00181 
00182 #ifndef ITK_MANUAL_INSTANTIATION
00183 #include "itkMedialNodePairCorrespondenceProcess.txx"
00184 #endif
00185 
00186 #endif
00187 

Generated at Thu May 28 10:46:41 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000