KWStyle - itkCoreAtomImageToDistanceMatrixProcess.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkCoreAtomImageToDistanceMatrixProcess.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:34 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkCoreAtomImageToDistanceMatrixProcess_h
18 #define __itkCoreAtomImageToDistanceMatrixProcess_h
19
20 #include "itkBloxCoreAtomImage.h"
21 #include "itkBloxCoreAtomPixel.h"
22 #include "itkDataObject.h"
23 #include "itkImage.h"
24 #include "itkMatrixResizeableDataObject.h"
25 #include "itkProcessObject.h"
26 #include "vnl/vnl_matrix.h"
27
28 namespace itk
29 {
30
31 /** \class CoreAtomImageToDistanceMatrixProcess
32  * \brief Computes the distance between all medial
33  * nodes (voted core atoms) in a core atom image (input) and stores
34  * them in a matrix data object (output)
35  *
36  */
37 template< typename TSourceImage >
38 class CoreAtomImageToDistanceMatrixProcess : public ProcessObject
39 {
40 public:
41   /** Number of dimensions */
42   itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
43
44   /** Standard class typedefs */
45   typedef CoreAtomImageToDistanceMatrixProcess  Self;
46 TDA   typedef ProcessObject Superclass;
47 TDA   typedef SmartPointer<Self>   Pointer;
48 TDA   typedef SmartPointer<const Self>  ConstPointer;
49
50   /** Smart Pointer type to a DataObject. */
51   typedef DataObject::Pointer DataObjectPointer;
52
53   /** Method for creation through the object factory */
54   itkNewMacro(Self);
55
56   /** Run-time type information (and related methods) */
57   itkTypeMacro(itkCoreAtomImageToDistanceMatrixProcess, ProcessObject);
58
59   //Get macro for m_NumNodes
60   itkGetMacro(NumberOfNodes, int);
61
62   /** Typedef for core atom image */
63   typedef TSourceImage CoreAtomImageType;
64 TDA   typedef typename CoreAtomImageType::Pointer CoreAtomImagePointer;
65 TDA   typedef typename CoreAtomImageType::RegionType CoreAtomImageRegionType; 
66 TDA   typedef typename CoreAtomImageType::PixelType CoreAtomImagePixelType; 
67 TDA   typedef typename CoreAtomImageType::ConstPointer CoreAtomImageConstPointer;
68
69   /** Typedef for distance matrix */
70   typedef MatrixResizeableDataObject<double> DistanceMatrixType;
71 TDA   typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
72
73   //MedialNode typedef
74   typedef BloxCoreAtomPixel<itkGetStaticConstMacro(NDimensions)> MedialNodeType;
75
76   /** The type used to store the position of the BloxPixel. */
77   typedef Point<double, itkGetStaticConstMacro(NDimensions)> PositionType;
78
79   /** Get the image output of this process object.  */
80   DistanceMatrixType * GetOutput(void);
81   DistanceMatrixType * GetOutput(unsigned int idx);
82
83   /** Set the blurred original image */
84   void SetInput1( const CoreAtomImageType * CoreAtomImageA );
85
86   virtual void Update() {this->GenerateData();}
87
88   virtual DataObjectPointer MakeOutput(unsigned int idx);
89
90 protected:
91   CoreAtomImageToDistanceMatrixProcess();
92   virtual ~CoreAtomImageToDistanceMatrixProcess(){} 
93
94   void PrintSelf(std::ostream& os, Indent indent) const;
95
96   /** Method for forming the DistanceeMatrix */
97   void GenerateData();
98
99   /** Methods to get input image */
100   TSourceImage * GetInput1();
101
102 private:
103   CoreAtomImageToDistanceMatrixProcess(const Self&); //purposely not implemented
104   void operator=(const Self&); //purposely not implemented
105
106   CoreAtomImagePointer m_CoreAtomImage;
107   DistanceMatrixPointer m_DistanceMatrix;
108
109   int m_NumberOfNodes;
110 };
111
112 // end namespace itk
113
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "itkCoreAtomImageToDistanceMatrixProcess.txx"
116 #endif
117
118 #endif
119

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:03PM
© Kitware Inc.