Friday, 27 September 2013

ImageJ: For Orthogonal Views for Stack of Dicom Images







package imagejexample;
import ij.IJ;
import ij.ImagePlus;
import ij.ImageStack;
import ij.WindowManager;
import ij.plugin.PlugIn;
import java.awt.Rectangle;
/**
*
* @author jay.thakkar
*/
public class RGB_Stack_Merge implements PlugIn {
private ImagePlus imp;
public static void main(String[] args) {
new ij.ImageJ();
IJ.runPlugIn("imagejexample.RGB_Stack_Merge", "");
}
@Override
public void run(String string) {
WindowManager.setTempCurrentImage(new ImagePlus("D:\\testImaes\\skull\\IM-0001-0001.DCM"));
imp = WindowManager.getTempCurrentImage();
System.out.println("imp.getImageStackSize()::"+imp.getImageStackSize());
Istogramma istogramma = new Istogramma(imp);
istogramma.showHistogram(imp, 1);
//imp.show();
//IJ.run(imp, "Scale...", "x=0.5 y=0.5 width=344 height=345 interpolate create title=[Scaled version of " + imp.getTitle() + "]");
IJ.run("Image Sequence...","open=[D:\\testImaes\\skull\\IM-0001-0001.DCM] number=361 starting=1 increment=1 scale=100 file=[] or=[] sort");
IJ.run("Orthogonal Views");
}
}
view raw RGB_Stack_Merge hosted with ❤ by GitHub

No comments: