Login  Register

Re: Save orthogonal views as avi?

Posted by Tiago Ferreira-2 on Oct 05, 2012; 3:23am
URL: http://imagej.273.s1.nabble.com/Save-orthogonal-views-as-avi-tp5000314p5000316.html

Martin,

On 2012.10.04, at 15:59 , Martin Höhne wrote:
> Is there a way of saving this whole view, i.e. xy, yz and xz including the
> moving yellow crosshair in one series/avi?


You could use the Image>Stacks>Reslice command to obtain the orthogonal
projections. Here is an exemplifying macro:

// ---- ---
run("T1 Head (2.4M, 16-bits)");
img = getImageID();
getVoxelSize(width, height, depth, unit);
vws = newArray("Top", "Left", "Bottom", "Right");

setBatchMode(true);
  // Create projections
  for (i=0; i<vws.length; i++) {
      selectImage(img);
      rtt = "";
      if (i%2) rtt = " rotate";
      run("Reslice [/]...", "output="+ depth +" start="+ vws[i] + rtt);
      rename(vws[i]);
  }

  // combine top views
  run("Combine...", "stack1="+ vws[0] +" stack2="+ vws[2] +" combine");
  rename("TB");

  // Append side views
  run("Combine...", "stack1="+ vws[1] +" stack2=TB");
  rename("LTB");
  run("Combine...", "stack1=LTB stack2="+ vws[3]);

setBatchMode("exit & display");
doCommand("Start Animation [\\]");
// ---- ---

Alternatively, you could try the 3D Viewer (orthoslice view) or Volume Viewer
plugins.

HTH,
-tiago

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html