|
@@ -30,19 +30,19 @@ protected:
|
|
/** image data, use carefully !!! data[channel][pixel_offset] */
|
|
/** image data, use carefully !!! data[channel][pixel_offset] */
|
|
std::vector<P*> data;
|
|
std::vector<P*> data;
|
|
// P **data;
|
|
// P **data;
|
|
-
|
|
|
|
|
|
+
|
|
/** image width */
|
|
/** image width */
|
|
int xsize;
|
|
int xsize;
|
|
-
|
|
|
|
|
|
+
|
|
/** image height */
|
|
/** image height */
|
|
int ysize;
|
|
int ysize;
|
|
|
|
|
|
/** image depth */
|
|
/** image depth */
|
|
int zsize;
|
|
int zsize;
|
|
-
|
|
|
|
|
|
+
|
|
/** number of image channels */
|
|
/** number of image channels */
|
|
uint numChannels;
|
|
uint numChannels;
|
|
-
|
|
|
|
|
|
+
|
|
public:
|
|
public:
|
|
|
|
|
|
virtual inline int width() const;
|
|
virtual inline int width() const;
|
|
@@ -95,20 +95,24 @@ public:
|
|
|
|
|
|
void addChannel( int newChans = 1 );
|
|
void addChannel( int newChans = 1 );
|
|
|
|
|
|
|
|
+ /** add a channel to Image */
|
|
|
|
+ template<class SrcP>
|
|
|
|
+ void addChannel(const NICE::ImageT<SrcP> &newImg );
|
|
|
|
+
|
|
/** add a channel to Multichannel Image */
|
|
/** add a channel to Multichannel Image */
|
|
template<class SrcP>
|
|
template<class SrcP>
|
|
void addChannel(const NICE::MultiChannelImageT<SrcP> &newImg );
|
|
void addChannel(const NICE::MultiChannelImageT<SrcP> &newImg );
|
|
-
|
|
|
|
|
|
+
|
|
template<class SrcP>
|
|
template<class SrcP>
|
|
void addChannel(const NICE::MultiChannelImage3DT<SrcP> &newImg);
|
|
void addChannel(const NICE::MultiChannelImage3DT<SrcP> &newImg);
|
|
|
|
|
|
/** add channels only as references (no deep memory copy) */
|
|
/** add channels only as references (no deep memory copy) */
|
|
template<class SrcP>
|
|
template<class SrcP>
|
|
void addChannelReferences(const NICE::MultiChannelImage3DT<SrcP> &newImg);
|
|
void addChannelReferences(const NICE::MultiChannelImage3DT<SrcP> &newImg);
|
|
-
|
|
|
|
|
|
+
|
|
/** get value */
|
|
/** get value */
|
|
P get( int x, int y, int z, uint channel = 0 ) const;
|
|
P get( int x, int y, int z, uint channel = 0 ) const;
|
|
-
|
|
|
|
|
|
+
|
|
/** get data pointer */
|
|
/** get data pointer */
|
|
std::vector<P*> getDataPointer() const;
|
|
std::vector<P*> getDataPointer() const;
|
|
//P** getDataPointer();
|
|
//P** getDataPointer();
|
|
@@ -124,14 +128,14 @@ public:
|
|
|
|
|
|
/** calc integral image */
|
|
/** calc integral image */
|
|
void calcIntegral( uint channel = 0 );
|
|
void calcIntegral( uint channel = 0 );
|
|
-
|
|
|
|
- /**
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
* @brief calculate the variance image map of a channel
|
|
* @brief calculate the variance image map of a channel
|
|
* @param srcchan source channel with raw data
|
|
* @param srcchan source channel with raw data
|
|
* @param tarchan target channel for the variance map
|
|
* @param tarchan target channel for the variance map
|
|
*/
|
|
*/
|
|
void calcVariance( uint srcchan = 0, uint tarchan = 1 );
|
|
void calcVariance( uint srcchan = 0, uint tarchan = 1 );
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @brief calculate the integral value in the volume given by upper left front corner and lower right back corner, including out of boundary check
|
|
* @brief calculate the integral value in the volume given by upper left front corner and lower right back corner, including out of boundary check
|
|
* @warning make sure that the given channel is an integral 3d image
|
|
* @warning make sure that the given channel is an integral 3d image
|
|
@@ -161,6 +165,9 @@ public:
|
|
/** return x-slice as image */
|
|
/** return x-slice as image */
|
|
ImageT<P> getXSlice ( int x, uint channel = 0 ) const;
|
|
ImageT<P> getXSlice ( int x, uint channel = 0 ) const;
|
|
|
|
|
|
|
|
+ /** return rgb image (reading channels 0, 1, 2) as MultiChannelImageT */
|
|
|
|
+ MultiChannelImageT<P> getColorMCI(int z) const;
|
|
|
|
+
|
|
/** return rgb image (reading channels 0, 1, 2) for visualization */
|
|
/** return rgb image (reading channels 0, 1, 2) for visualization */
|
|
ColorImage getColor(int z) const;
|
|
ColorImage getColor(int z) const;
|
|
|
|
|
|
@@ -177,19 +184,19 @@ public:
|
|
|
|
|
|
/** do a histogram equalization */
|
|
/** do a histogram equalization */
|
|
void equalizeHistogram( uint channel = 0 ) const;
|
|
void equalizeHistogram( uint channel = 0 ) const;
|
|
-
|
|
|
|
|
|
+
|
|
/** dump all data to RAW format: xsize, ysize, numChannels, <data> */
|
|
/** dump all data to RAW format: xsize, ysize, numChannels, <data> */
|
|
void store( std::string filename ) const;
|
|
void store( std::string filename ) const;
|
|
|
|
|
|
/** read all data from RAW format: xsize, ysize, numChannels, <data> */
|
|
/** read all data from RAW format: xsize, ysize, numChannels, <data> */
|
|
void restore( std::string filename );
|
|
void restore( std::string filename );
|
|
-
|
|
|
|
|
|
+
|
|
/** copy alls data to new object */
|
|
/** copy alls data to new object */
|
|
MultiChannelImage3DT<P>& operator=( const MultiChannelImage3DT<P>& orig );
|
|
MultiChannelImage3DT<P>& operator=( const MultiChannelImage3DT<P>& orig );
|
|
-
|
|
|
|
|
|
+
|
|
/** element operator */
|
|
/** element operator */
|
|
P & operator() (int x, int y, int z, uint channel = 0);
|
|
P & operator() (int x, int y, int z, uint channel = 0);
|
|
-
|
|
|
|
|
|
+
|
|
/** element operator */
|
|
/** element operator */
|
|
MultiChannelImageT<P> operator[] (uint c);
|
|
MultiChannelImageT<P> operator[] (uint c);
|
|
};
|
|
};
|