]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuAxeVolume.cxx
2390 creaMaracasVisu Feature New Normal manual contour information in units and pixels
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuAxeVolume.cxx
index 53c5d385544f9480f72a17e724c35ffcfce68719..79e5ac0cf0fbfb4ccbed8ce1268a661ec33599f3 100644 (file)
@@ -69,13 +69,15 @@ void AxeVolume::Process()
 
 
        int i,j,k;
-    int sizeLstPointR = bbGetInputlstPointR().size();
-       int iAxe,sizeAxe=bbGetInputlstPointX().size();
+       int sizeLstPointR       = bbGetInputlstPointR().size();
+       int iAxe,sizeAxe        = bbGetInputlstPointX().size();
        double rx,ry,rz;
        double r,rr;
        unsigned short *p;
-       int sizeImage = sizeX*sizeY*sizeZ;
-       double px,py,pz,px1,py1,pz1,px2,py2,pz2;
+       int sizeImage           = sizeX*sizeY*sizeZ;
+       double px,py,pz;
+       double px1,py1,pz1;
+       double px2,py2,pz2;
 
        // Clean image
        p = (unsigned short*)mimage->GetScalarPointer (0, 0, 0);
@@ -87,16 +89,16 @@ void AxeVolume::Process()
 
        for (iAxe=0 ; iAxe<sizeAxe; iAxe++)
         {
-               if (sizeLstPointR<iAxe)
+               if (iAxe<sizeLstPointR)
                {
+                       r = bbGetInputlstPointR()[ iAxe ]* invSpc[0];
+               } else {
                        if (bbGetInputlstPointR().size()>=1)
                        {
                                r = bbGetInputlstPointR()[ bbGetInputlstPointR().size()-1 ]    * invSpc[0];
                        } else {
                                r = 1;
                        }
-               } else {
-                       r = bbGetInputlstPointR()[ iAxe ]* invSpc[0];
                }
                px = bbGetInputlstPointX()[iAxe] * invSpc[0];
                py = bbGetInputlstPointY()[iAxe] * invSpc[1];