]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkSurfaceTexture.cxx
#3301 BBTK Bug New Normal SurfaceTexture
[bbtk.git] / packages / vtk / src / bbvtkSurfaceTexture.cxx
index 0016c6eeb502c29ce1a2985119e8a679e8087418..2d5c86d3c9f7887632eb06d3754f5a504b414860 100644 (file)
@@ -197,7 +197,7 @@ void SurfaceTexture::Process()
                
                if ( (p2[0]>=0) && (p2[0]<maxX) && (p2[1]>=0) && (p2[1]<maxY) &&(p2[2]>=0) && (p2[2]<maxZ)  )
                {
-                  gl =  bbGetInputImage()->GetScalarComponentAsDouble(p2[0], p2[1], p2[2],0);
+                  gl =  bbGetInputImage()->GetScalarComponentAsDouble(round(p2[0]), round(p2[1]), round(p2[2]),0);
                } else {
                        gl=0;
                }
@@ -221,6 +221,7 @@ void SurfaceTexture::bbUserSetDefaultValues()
        bbSetInputColorLevel(500);
        bbSetInputColorWindow(500);
        bbSetInputTransform(NULL);
+       bbSetInputExternalLookupTable(NULL);
   
        firsttime                               = true;
        colors                                  = NULL;