//load Plug-ings
MarvinImagePlugin plgImage1 = MarvinPluginLoader.loadImagePlugin("org.marvinproject.image.statistical.Maximum.jar");
MarvinImagePlugin plgImage2 = MarvinPluginLoader.loadImagePlugin("org.marvinproject.image.statistical.Maximum.jar");
//create masks
MarvinImageMask mask1 = new MarvinImageMask(
imageIn.getWidth(), // width
imageIn.getHeight(), // height
0, // x-start
0, // y-start
imageIn.getWidth(), // region's width
imageIn.getHeight() /2 // region's height
);
MarvinImageMask mask2 = new MarvinImageMask(
imageIn.getWidth(), // width
imageIn.getHeight(), // height
0, // x-start
imageIn.getHeight() / 2, // y-start
imageIn.getWidth(), // region's width