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

mitkNeighborhood.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 #ifndef __mitkNeighborhood_h
00011 #define __mitkNeighborhood_h
00012 
00013 #include "mitkCommonIncludes.h"
00014 #include "mitk_nl/mitk_nl_vector.h"
00015 #include <vector>
00016 #include <stdlib.h>
00017 #include <string.h>
00018 
00030 //  [8/18/2010 Xiuli Li]
00031 
00032 class MITK_COMMON_API mitkNeighborhood
00033 {
00034 public:
00036     typedef mitkNeighborhood Self;
00037 
00038     typedef mitk_nl_vector<int> VectorIndexType;
00039     typedef mitk_nl_vector<VectorIndexType> OffsetType;
00040 
00041     mitkNeighborhood();
00042     mitkNeighborhood(unsigned int dimension);
00043 
00045     ~mitkNeighborhood() {}
00046 
00048     mitkNeighborhood(const Self& other);
00049 
00051     void operator=(const Self& other);
00052 
00054     /*bool
00055         operator==(const Self& other) const
00056     {
00057         return ((m_Radius == other.m_Radius) &&
00058             (m_Size   == other.m_Size) &&
00059             (m_OffsetTable == other.m_OffsetTable));
00060     }*/
00061 
00063     /*bool operator!=(const Self& other) const
00064     {
00065         return ((m_Radius != other.m_Radius) ||
00066             (m_Size   != other.m_Size) ||
00067             (m_OffsetTable != other.m_OffsetTable));
00068     }*/
00069 
00084     void SetDataType(int data_type);
00085 
00100     int GetDataType() const { return m_DataType; }
00101 
00102     void SetRadius(VectorIndexType& radius);
00103 
00104     VectorIndexType GetRadius() const { return m_Radius;}
00105 
00106     VectorIndexType GetSize();
00107 
00108     VectorIndexType GetStrideTable();
00109 
00110     OffsetType GetOffsetTable();
00111 
00112 //  virtual unsigned int GetNeighborhoodIndex(const OffsetType &) const;
00113 
00114     unsigned int GetCenterNeighborhoodIndex() const
00115     {
00116         return  m_OffsetTable.size()/2;
00117     }
00118     
00119 protected:
00120     unsigned int m_Dimension;
00121     int   m_DataType;
00122 
00123     VectorIndexType m_Radius;
00124     VectorIndexType m_Size;
00125     VectorIndexType m_StrideTable;
00126 
00127     VectorIndexType m_Offset;
00128     OffsetType m_OffsetTable;
00129 private:
00130 };
00131 
00132 #endif

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