Эх сурвалжийг харах

set getter-function as const

Sven Sickert 11 жил өмнө
parent
commit
a3fa52dbfe

+ 1 - 1
core/image/MultiChannelImage3DT.h

@@ -127,7 +127,7 @@ public:
    * @param channel channel
    * @return P mean value of given volume
    **/
-  P getIntegralValue(int ulfx, int ulfy, int ulfz, int lrbx, int lrby, int lrbz, int channel);
+  P getIntegralValue(int ulfx, int ulfy, int ulfz, int lrbx, int lrby, int lrbz, int channel) const;
 
   /** convert to ice image */
   void convertToGrey( NICE::Image & img, int z, uint channel = 0, bool normalize = true ) const;

+ 1 - 1
core/image/MultiChannelImage3DT.tcc

@@ -680,7 +680,7 @@ void MultiChannelImage3DT<P>::calcVariance( uint srcchan, uint tarchan )
 }
 
 template<class P>
-P MultiChannelImage3DT<P>::getIntegralValue(int ulfx, int ulfy, int ulfz, int lrbx, int lrby, int lrbz, int channel)
+P MultiChannelImage3DT<P>::getIntegralValue(int ulfx, int ulfy, int ulfz, int lrbx, int lrby, int lrbz, int channel) const
 {
   ulfx = std::max(ulfx-1, -1);
   ulfx = std::min(ulfx, xsize-1);