Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkLiveWireImageFilter.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkLiveWireImageFilter_h
00012 #define __mitkLiveWireImageFilter_h
00013 
00014 #include "mitkSegmentationIncludes.h"
00015 #include "mitkVolumeToVolumeFilter.h"
00016 
00017 class MITK_SEGMENTATION_API point 
00018 {
00019 public:
00020     
00021     point()
00022     {
00023         x = -1;
00024         y = -1; 
00025         value = -1;
00026     }
00027 
00028     point(int wx, int wy)
00029     {
00030         x = wx;
00031         y = wy;
00032     }
00033 
00034     point(int wx, int wy, double val)
00035     {
00036         x = wx;
00037         y = wy;
00038         value = val;
00039     }
00040 
00041 
00042     ~point(){};
00043 
00044 
00050     point& operator=(const point& right)
00051     {
00052         x = right.x;
00053         y = right.y;
00054         value = right.value;
00055         return *this;
00056     }
00057     
00058     int x;
00059     int y;
00060     double value;
00061 };
00062 
00063 class Contour;
00064 
00068 class MITK_SEGMENTATION_API mitkLiveWireImageFilter : public mitkVolumeToVolumeFilter
00069 {
00070 
00071 public:
00072     MITK_TYPE(mitkLiveWireImageFilter,mitkVolumeToVolumeFilter)
00073 
00074     
00075 
00076 
00077     mitkLiveWireImageFilter();
00078     
00079     virtual void PrintSelf(ostream& os){};
00080 
00084     virtual ~mitkLiveWireImageFilter();
00085 
00086     void Initialize();
00087 
00088     void SetStartPoint(int x, int y)
00089     {
00090         this->m_StartPoint.x = x;
00091         this->m_StartPoint.y = y;
00092     }
00093     void SetEndPoint(int x, int y);
00094 
00095     Contour* GetContour(){return this->m_Contour;}
00096 
00097 protected:
00098     virtual bool Execute();
00099     void ClearDir();
00100 
00101     double **m_CRow;
00102     double **m_CCol;
00103     double *m_GradientImage;
00104 
00105     //record the value of the dir node
00106     double *m_DirVal;
00107     //record the x-cor of the dir node
00108     int *m_DirX;
00109     //record the y-cor of the dir node
00110     int *m_DirY;
00111     
00112     point m_StartPoint;
00113     point m_EndPoint;
00114 
00115 private:
00116     mitkLiveWireImageFilter(const mitkLiveWireImageFilter&){};
00117     void operator=(const mitkLiveWireImageFilter&){};
00118 
00119     int m_Width;
00120     int m_Height;
00121     Contour *m_Contour;
00122 
00123 };
00124 
00125 
00126 #endif
00127 
00128 
00129 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3