Skip to content, Skip to search



1 byte added, 02:38, 18 January 2017
Segmentation pipeline prototype: simplify script using output parameter
<source lang="java">
// @ImagePlus imp
// @OUTPUT ImagePlus resultImage
// ImageJ imports
import ij.IJ;
import inra.ijpb.morphology.Strel3D;
import inra.ijpb.watershed.Watershed;
// create structuring element (cube of radius 1)
strel = Strel3D.Shape.CUBE.fromRadius( 1 );
// gradient image (the "true" value indicates the use of dams in the output)
resultStack = Watershed.computeWatershed( imposedMinima, labeledMinima, 6, true );
// create image with watershed result
resultImage = new ImagePlus( "watershed", resultStack );
// assign right calibration
resultImage.setCalibration( imp.getCalibration() );
<// and show;source>
==== Label visualization in 3D viewer ====
Making use of MorphoLibJ's label methods and the [[3D_Viewer|ImageJ 3D Viewer]]'s visualization tools it is quite simple to create a script to display each label of an image as 3D surfaces of the corresponding colors provided by the image look-up table:
Emailconfirmed, incoming, administrator, uploaders