User Tools

Site Tools


blogtng:2011-07-07:fiji_3d_viewer_in_windows

Fiji 3D Viewer in Windows

3DViewer is a great plugin that enables interactive viewing of 3D structure. It has many useful functions including 3D time lapse visualization.

The plugin has one problem when used in some of Windows XPs (not in Vista, Win7, Mac OSX), and the symptom is like this:

On start up, the rendered volume is zoomed-up too much, so that one could not find where the object is. Zooming tool (magnification tool from the menu bar) also does not work, so one must adjust the zooming level from scripts.

Similar problem is reported here.

By the way, a test for the Java3D is OK (could be tested via some pages such as here).

Below is a javascript that does this. Zooming level could be adjusted by changing the value in the line 12.

importPackage(Packages.ij3d);
importPackage(Packages.javax.media.j3d);
importPackage(Packages.javax.vecmath);

imp = IJ.getImage();
StackConverter(imp).convertToGray8();
univ = new Image3DUniverse();
univ.show();

c = univ.addVoltex(imp);
t3d = new Transform3D();
t3d.setScale(0.002);
c.applyTransform(t3d);

Alternatively, one could also change the zooming from the menu. Following is an example of doing so.

  1. adjust the zooming factor by [Transformation > apply transform] and setting the affine transformation matrix.
  2. some example affine transfromation matrix (only scaling)
    1. 0.001 0.0 0.0 0.0 0.0 0.001 0.0 0.0 0.0 0.0 0.001 0.0 0.0 0.0 0.0 1.0
    2. 2.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0 1.0
    3. 0.5 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.0 1.0
  3. then [view > center > selected content] to place the content in the center of the canvas.

Updates

I made further tests of 3Dviewer with various windows machines and in most cases, it worked fine.
“flybrain” sample 3D stack, accessible via File > Open Sample > Flybrain, was used. THis 3-channel image was separated with channels and used the green channel stack for the test.

  1. win7 64x: OK
  2. vista 32x: OK
  3. XP 32x, service pack 3: not OK, zooming problem
  4. XP 32x, service pack 3: OK
  5. XP 64x, service pack 2: OK

Comparison of Java3D properties in XP machines (3 to 5) is in a table (link).

I still cannot figure out why No.3 machine is not working. A hint could be that the GUI tool for zooming (magnifying glass tool) does not work at all in case of machine No.3, but in all other cases it worked fine.

another case of problem, with DirectX

Another case of problem with 3Dviewer I encountered was a bit more straight forward. When DirectX was uses as render, then the object does not appear in the canvas. For this, one could start-up fiji with some option as below to force use OpenGL. In my case, I wrote a single line batch file to start-up fiji.

c:\Fiji.app\fiji-win32 -Dj3d.rend=ogl --console --mem=500m --
More details on options are available here.

blogtng/2011-07-07/fiji_3d_viewer_in_windows.txt · Last modified: 2016/05/24 12:46 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki