code: public void process( T input , GrayS32 output ) {
  		if( output.isSubimage() )
  			throw new IllegalArgumentException("Output can't be a sub-image");
  		InputSanityCheck.checkSameShape(input, output);
  
  		initialize(input,output);
  
  		// compute edges weights
  //		long time0 = System.currentTimeMillis();
  		computeWeights.process(input, edges);
  //		long time1 = System.currentTimeMillis();
  
  //		System.out.println("Edge weights time " + (time1 - time0));
  
  		// Merge regions together
  		mergeRegions();
  
  		// Get rid of small ones
  		mergeSmallRegions();
  
  		// compute the final output
  		computeOutput();
  	}
docs: Segments the image.  Each region in the output image is given a unique ID.  To find out what the ID
  of each region is call {@link #getRegionId()}.  To get a list of number of pixels in each region call
  {@link #getRegionSizes()}.
  
  @param input Input image.  Not modified.
  @param output Output segmented image.  Modified.