Login  Register

3D Viewer Transformations

Posted by Jürgen Gluch on Feb 18, 2013; 1:01am
URL: http://imagej.273.s1.nabble.com/3D-Viewer-Transformations-tp5001798.html

Hi!
I want to apply transformations to an volume in 3d viewer from within a
macro. It works and I can rotate the selected volume around the Origin of
the volume. e.g. around the x-Axis:

// 1      0        0    0
// 0 cos(a) -sin(a) 0
// 0 sin(a)  cos(a) 0
// 0      0         0   1
call("ij3d.ImageJ3DViewer.applyTransform", "1 0 0 0 0 "+cos(a)+"
"+(-sin(a))+" 0 0 "+sin(a)+" "+cos(a)+" 0 0 0 0 1 ");

But how can I access the volume size or coordinates of the center to
calculate the affine matrix for rotation around the center from within the
macro?

JG

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