00001
00002
00003
00004
00005
00006
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
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
00055
00056
00057
00058
00059
00060
00061
00063
00064
00065
00066
00067
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
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