Skip to content

Commit

Permalink
Read correctly current slice of stacks.
Browse files Browse the repository at this point in the history
Use getCurrentSlice() instead of getSlice().
  • Loading branch information
iarganda committed Sep 9, 2017
1 parent 0804a98 commit f2d5ca0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ else if ( displayOption.equals( overlaidBasinsText ) )
if( null != watershedResult )
{
watershedResult.show();
watershedResult.setSlice( displayImage.getSlice() );
watershedResult.setSlice( displayImage.getCurrentSlice() );
}

// Macro recording
Expand Down Expand Up @@ -1625,7 +1625,7 @@ public void run(String arg0)
displayImage = new ImagePlus( inputImage.getTitle(),
inputStackCopy );
displayImage.setTitle("Morphological Segmentation");
displayImage.setSlice( inputImage.getSlice() );
displayImage.setSlice( inputImage.getCurrentSlice() );

// hide input image (to avoid accidental closing)
inputImage.getWindow().setVisible( false );
Expand Down Expand Up @@ -1791,7 +1791,7 @@ else if( mode.equals( MorphologicalSegmentation.overlaidDamsText ))
if( null != result )
{
result.show();
result.setSlice( win.getImagePlus().getSlice() );
result.setSlice( win.getImagePlus().getCurrentSlice() );
}
}
}
Expand Down

0 comments on commit f2d5ca0

Please sign in to comment.