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: 2009-05-12 17:26:20 $
00007   Version:   $Revision: 1.4 $
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 ITK_EXPORT 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;
00080 
00082   typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),3> OutputNodeType;
00083   typedef CorrespondenceDataStructure<OutputNodeType,3> OutputDataStructureType;
00084   typedef typename CorrespondenceDataStructure<OutputNodeType,3>::Pointer OutputDataStructurePointerType;
00085   typedef CorrespondenceDataStructureIterator<OutputDataStructureType> OutputIteratorType;
00087 
00089   typedef MatrixResizeableDataObject<double>   DistanceMatrixType;
00090   typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
00091 
00093   OutputDataStructureType * GetOutput(void);
00094   OutputDataStructureType * GetOutput(unsigned int idx);
00096 
00098   void SetPairDataStructure(const InputDataStructureType * InputDataStructure );
00099 
00101   void SetCoreAtomImageA( const CoreAtomImageType * CoreAtomImageA );
00102 
00104   void SetCoreAtomImageB( const CoreAtomImageType * CoreAtomImageB );
00105 
00107   void SetDistanceMatrixA( const DistanceMatrixType * DistanceMatrixA );
00108 
00110   void SetDistanceMatrixB( const DistanceMatrixType * DistanceMatrixB );
00111 
00113   virtual void Update() {this->GenerateData();}
00114 
00115   virtual DataObjectPointer MakeOutput(unsigned int idx);
00116 
00118   int GetNumberOfNodeTriplets() {return m_NumberOfTriplets;}
00119   int GetNumberOfNodeTripletBases() {return m_NumberOfNodeBaseTriplets;}
00121 
00122 protected:
00123 
00124   MedialNodeTripletCorrespondenceProcess();
00125   virtual ~MedialNodeTripletCorrespondenceProcess(){} 
00126 
00127   void PrintSelf(std::ostream& os, Indent indent) const;
00128 
00130   void GenerateData();
00131 
00133   TSourceImage * GetCoreAtomImageA();
00134   TSourceImage * GetCoreAtomImageB();
00136 
00138   DistanceMatrixType * GetDistanceMatrixA();
00139   DistanceMatrixType * GetDistanceMatrixB();
00141 
00142 private:
00143   MedialNodeTripletCorrespondenceProcess(const Self&); //purposely not implemented
00144   void operator=(const Self&); //purposely not implemented
00145 
00146   CoreAtomImagePointer m_CoreAtomImageA;
00147   CoreAtomImagePointer m_CoreAtomImageB;
00148 
00149   DistanceMatrixPointer m_DistanceMatrixA;
00150   DistanceMatrixPointer m_DistanceMatrixB;
00151 
00152   InputDataStructurePointerType  m_InputDataStructure;
00153   OutputDataStructurePointerType m_OutputDataStructure;
00154 
00155   int m_NumberOfTriplets;
00156   int m_NumberOfNodeBaseTriplets;
00157 
00158   bool m_CreateOutputFile;
00159 };
00160 
00161 } // end namespace itk
00162 
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkMedialNodeTripletCorrespondenceProcess.txx"
00165 #endif
00166 
00167 #endif
00168 

Generated at Mon Jul 12 2010 19:08:01 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000