Marko,
Use the ImageProcessor class resize(int new_width, int new_height) method,
such as:
ImagePlus imp_big = WindowManager.getCurrentImage();
ImageProcessor ip_big = imp_big.getProcessor();
ip_big.setInterpolate(true);
ImageProcessor ip_small = resize(320, 256);
ImagePlus small = new ImagePlus("small", ip_small);
small.show();
Of course you can write the above in a much compact manner, and there's not
much need to setup interpolation when scaling down. That's up to your style
and requirements.
Albert
--
Albert Cardona
Molecular Cell Developmental Biology
University of California Los Angeles
Tel +1 310 2067376
Programming:
http://www.pensament.net/java/Research:
http://www.mcdb.ucla.edu/Research/Hartenstein/Web design:
http://www.pixelets.com