BUG: Mutiple bug: Replace if/else if by a if/if. Indeed the first pixel you find could be the min, with a else if, the value was stored as max, and never found again for min if voxelcount is 1 (could happen) there was a divide by 0 should not increment the number of voxel taken into account if discarding the zero one finally make sure to cast to double for floating point comparison
BUG: Mutiple bug:
Replace if/else if by a if/if. Indeed the first pixel you find could be the min, with a else if, the value was stored as max, and never found again for min
if voxelcount is 1 (could happen) there was a divide by 0
should not increment the number of voxel taken into account if discarding the zero one
finally make sure to cast to double for floating point comparison

mspark93/VTK,arnaudgelas/VTK,berendkleinhaneveld/VTK,spthaolt/VTK,sankhesh/VTK,Wuteyan/VTK,jmerkow/VTK,spthaolt/VTK,demarle/VTK,sankhesh/VTK,cjh1/VTK,daviddoria/PointGraphsPhase1,jeffbaumes/jeffbaumes-vtk,berendkleinhaneveld/VTK,naucoin/VTKSlicerWidgets,mspark93/VTK,SimVascular/VTK,biddisco/VTK,jmerkow/VTK,demarle/VTK,collects/VTK,naucoin/VTKSlicerWidgets,berendkleinhaneveld/VTK,ashray/VTK-EVM,ashray/VTK-EVM,aashish24/VTK-old,aashish24/VTK-old,hendradarwin/VTK,biddisco/VTK,spthaolt/VTK,aashish24/VTK-old,keithroe/vtkoptix,SimVascular/VTK,gram526/VTK,Wuteyan/VTK,jeffbaumes/jeffbaumes-vtk,sankhesh/VTK,msmolens/VTK,SimVascular/VTK,jmerkow/VTK,gram526/VTK,mspark93/VTK,msmolens/VTK,aashish24/VTK-old,naucoin/VTKSlicerWidgets,jmerkow/VTK,naucoin/VTKSlicerWidgets,keithroe/vtkoptix,collects/VTK,arnaudgelas/VTK,msmolens/VTK,daviddoria/PointGraphsPhase1,sankhesh/VTK,sumedhasingla/VTK,jeffbaumes/jeffbaumes-vtk,SimVascular/VTK,jmerkow/VTK,hendradarwin/VTK,msmolens/VTK,demarle/VTK,hendradarwin/VTK,jeffbaumes/jeffbaumes-vtk,arnaudgelas/VTK,berendkleinhaneveld/VTK,collects/VTK,johnkit/vtk-dev,johnkit/vtk-dev,demarle/VTK,keithroe/vtkoptix,collects/VTK,johnkit/vtk-dev,naucoin/VTKSlicerWidgets,Wuteyan/VTK,hendradarwin/VTK,jeffbaumes/jeffbaumes-vtk,sumedhasingla/VTK,arnaudgelas/VTK,sankhesh/VTK,jeffbaumes/jeffbaumes-vtk,biddisco/VTK,berendkleinhaneveld/VTK,keithroe/vtkoptix,sumedhasingla/VTK,candy7393/VTK,ashray/VTK-EVM,biddisco/VTK,hendradarwin/VTK,SimVascular/VTK,hendradarwin/VTK,candy7393/VTK,mspark93/VTK,daviddoria/PointGraphsPhase1,candy7393/VTK,biddisco/VTK,johnkit/vtk-dev,sankhesh/VTK,mspark93/VTK,sumedhasingla/VTK,sankhesh/VTK,naucoin/VTKSlicerWidgets,spthaolt/VTK,msmolens/VTK,sumedhasingla/VTK,SimVascular/VTK,gram526/VTK,demarle/VTK,spthaolt/VTK,gram526/VTK,SimVascular/VTK,jmerkow/VTK,gram526/VTK,daviddoria/PointGraphsPhase1,keithroe/vtkoptix,johnkit/vtk-dev,sankhesh/VTK,biddisco/VTK,cjh1/VTK,candy7393/VTK,msmolens/VTK,mspark93/VTK,cjh1/VTK,arnaudgelas/VTK,biddisco/VTK,Wuteyan/VTK,jmerkow/VTK,ashray/VTK-EVM,mspark93/VTK,msmolens/VTK,candy7393/VTK,candy7393/VTK,keithroe/vtkoptix,ashray/VTK-EVM,demarle/VTK,SimVascular/VTK,sumedhasingla/VTK,demarle/VTK,spthaolt/VTK,mspark93/VTK,spthaolt/VTK,sumedhasingla/VTK,Wuteyan/VTK,cjh1/VTK,berendkleinhaneveld/VTK,arnaudgelas/VTK,aashish24/VTK-old,keithroe/vtkoptix,gram526/VTK,daviddoria/PointGraphsPhase1,demarle/VTK,daviddoria/PointGraphsPhase1,jmerkow/VTK,gram526/VTK,johnkit/vtk-dev,Wuteyan/VTK,ashray/VTK-EVM,msmolens/VTK,johnkit/vtk-dev,candy7393/VTK,cjh1/VTK,hendradarwin/VTK,cjh1/VTK,collects/VTK,aashish24/VTK-old,collects/VTK,berendkleinhaneveld/VTK,ashray/VTK-EVM,sumedhasingla/VTK,Wuteyan/VTK,keithroe/vtkoptix,ashray/VTK-EVM,candy7393/VTK,gram526/VTK