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

itkMedialNodeTripletCorrespondenceProcess.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMedialNodeTripletCorrespondenceProcess.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:35 $
00007   Version:   $Revision: 1.2 $
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 __itkMedialNodeTripletCorrespondenceProcess_h
00018 #define __itkMedialNodeTripletCorrespondenceProcess_h
00019 
00020 #include "itkImage.h"
00021 #include "itkProcessObject.h"
00022 #include "itkBloxCoreAtomImage.h"
00023 #include "itkBloxCoreAtomPixel.h"
00024 #include "itkMatrixResizeableDataObject.h"
00025 
00026 #include "itkPNGImageIO.h"
00027 #include "itkImageFileWriter.h"
00028 #include "itkRawImageIO.h"
00029 
00030 #include "itkCorrespondenceDataStructure.h"
00031 #include "itkCorrespondenceDataStructureIterator.h"
00032 
00033 namespace itk
00034 {
00035   
00044 template< typename TSourceImage >
00045 class MedialNodeTripletCorrespondenceProcess : public ProcessObject
00046 {
00047 public:
00048  
00050   itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
00051 
00053   typedef MedialNodeTripletCorrespondenceProcess  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(MedialNodeTripletCorrespondenceProcess, 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 CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),2> InputNodeType;
00076   typedef CorrespondenceDataStructure<InputNodeType,2> InputDataStructureType;
00077   typedef typename CorrespondenceDataStructure<InputNodeType,2>::Pointer InputDataStructurePointerType;
00078   typedef CorrespondenceDataStructureIterator<InputDataStructureType> InputIteratorType;
00079 
00081   typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),3> OutputNodeType;
00082   typedef CorrespondenceDataStructure<OutputNodeType,3> OutputDataStructureType;
00083   typedef typename CorrespondenceDataStructure<OutputNodeType,3>::Pointer OutputDataStructurePointerType;
00084   typedef CorrespondenceDataStructureIterator<OutputDataStructureType> OutputIteratorType;
00085 
00087   typedef MatrixResizeableDataObject<double> DistanceMatrixType;
00088   typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
00089 
00091   OutputDataStructureType * GetOutput(void);
00092   OutputDataStructureType * GetOutput(unsigned int idx);
00093 
00095   void SetPairDataStructure(const InputDataStructureType * InputDataStructure );
00096   
00098   void SetCoreAtomImageA( const CoreAtomImageType * CoreAtomImageA );
00099 
00101   void SetCoreAtomImageB( const CoreAtomImageType * CoreAtomImageB );
00102 
00104   void SetDistanceMatrixA( const DistanceMatrixType * DistanceMatrixA );
00105 
00107   void SetDistanceMatrixB( const DistanceMatrixType * DistanceMatrixB );
00108 
00110   virtual void Update() {this->GenerateData();}
00111 
00112   virtual DataObjectPointer MakeOutput(unsigned int idx);
00113 
00115   int GetNumberOfNodeTriplets() {return m_NumberOfTriplets;}
00116   int GetNumberOfNodeTripletBases() {return m_NumberOfNodeBaseTriplets;}
00117 
00118 protected:
00119 
00120   MedialNodeTripletCorrespondenceProcess();
00121   virtual ~MedialNodeTripletCorrespondenceProcess(){} 
00122 
00123   void PrintSelf(std::ostream& os, Indent indent) const;
00124 
00126   void GenerateData();
00127 
00129   TSourceImage * GetCoreAtomImageA();
00130   TSourceImage * GetCoreAtomImageB();
00131 
00133   DistanceMatrixType * GetDistanceMatrixA();
00134   DistanceMatrixType * GetDistanceMatrixB();
00135 
00136 private:
00137   MedialNodeTripletCorrespondenceProcess(const Self&); //purposely not implemented
00138   void operator=(const Self&); //purposely not implemented
00139 
00140   CoreAtomImagePointer m_CoreAtomImageA;
00141   CoreAtomImagePointer m_CoreAtomImageB;
00142 
00143   DistanceMatrixPointer m_DistanceMatrixA;
00144   DistanceMatrixPointer m_DistanceMatrixB;
00145 
00146   InputDataStructurePointerType m_InputDataStructure;
00147   OutputDataStructurePointerType m_OutputDataStructure;
00148 
00149   int m_NumberOfTriplets;
00150   int m_NumberOfNodeBaseTriplets;
00151 
00152   bool m_CreateOutputFile;
00153 };
00154 
00155 } // end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkMedialNodeTripletCorrespondenceProcess.txx"
00159 #endif
00160 
00161 #endif

Generated at Wed May 24 23:39:20 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000