- for( z=minZ ; z<=maxZ ; z=z+step )
- {
-// porcent = 100.0* (z-minZ)/totalZ;
-// tmpString.Printf(_T(" %d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ,z );
-// interfMainPanel::getInstance()->setLabelSegmentationPanelVTK(tmpString);
- //_staticTextSegmentation->SetLabel(tmpString);
- SegmentationOneSlice( 100,100,z,isovalue, sampling,method , imagedata );
- }
-// interfMainPanel::getInstance()->setLabelSegmentationPanelVTK(_T(" "));
- RefreshInterface();
+ if (step>=1) {
+ int _minZ = minZ/step;
+ _minZ=_minZ*step;
+ for( z=_minZ ; z<=maxZ ; z=z+step )
+ {
+ // porcent = 100.0* (z-minZ)/totalZ;
+ // tmpString.Printf(_T(" %d %c %d/%d %d"), (int)porcent , 37 , z-minZ+1, (int)totalZ,z );
+ // interfMainPanel::getInstance()->setLabelSegmentationPanelVTK(tmpString);
+ //_staticTextSegmentation->SetLabel(tmpString);
+ SegmentationOneSlice( 100,100,z,isovalue, sampling,method , imagedata );
+ }
+ // interfMainPanel::getInstance()->setLabelSegmentationPanelVTK(_T(" "));
+ RefreshInterface();
+ } // if step