ImageJ is an image processing software, very popular in the Life-Science field. If you are a master student, a PhD or a postdoc in Biology, there is a very good chance that ImageJ is installed on your computer.
ImageJ is developed mainly by Wayne Rasband, and is written in Java (see http://rsb.info.nih.gov/ij/index.html). It has a clever plugin system that allows users to extend it with new functionalities.
Fiji (Fiji is Just ImageJ, http://fiji.sc/) is a distribution of ImageJ, that includes (amongst other things) a lot of plugins, some useful libraries and an updater to keep everything up to date.
In this demo bundle, we demonstrate how to use Fiji to get a very nice, hardware accelerated, 3D viewer in MATLAB.
Note on updates on these demos files: If you have already installed Fiji and set the paths as explained in this demo introduction, you do not have to re-download them from the FEX. All you have to do is launch Fiji and run the updater. The demo files, which are part of the Fiji distribution, will be updated as well,
I need to add x_label and y_label in ImageJ 3D Viewer. Would you please help me how can do it?
I am running MATLAB 2014b on Mac OS X 10.9.5 (Mavericks) and was able to start Fiji from MATLAB using Miji and transfer an image opened by Fiji to a MATLAB array, until I installed InstallJava3D.
Now I get
Exception in thread "Startup Class Loader" java.lang.NoSuchMethodError:
even before running Miji. Once I do run Miji, I can no display transfered image arrays using imshow, instead MATLAB crashes. It seems that Java3D has broken something in the MATLAB install.
If I try to run Matlab3DViewerDemo_1.m,
I get the following error:
/Users/my_name/.ImageJ_3D_Viewer.props (No such file or directory)
Has anyone else experienced this? Any solution?
The author here,
For some reason it does not seem to work with MATLAB R2014a on MaxOSX. Can someone confirm?
I have a questions:
o) is it possible to set the transparency?
Thanks for sharing! Miji worked like a charm. It enabled me to batch process with functions in imagej wothout manully switching back n forth between matlab and imagej!
It was great documents from Matlab to 3D Viewer. I am curious that can I link another ImageJ/fiji plug-ins such as volume viewer using this MIJ?
If yes, How can I link them? I saw the demo files and use ij3d.Image3DUniverse() to open 3-D viewer. But in volume viewer, I don't think we use ij3D class.
Can you let me know any directions to solve this problem??
While the export of data from Matlab to 3D Viewer is well documented the path backward is difficult to figure out.
1) I have not figured out how to import a rendered scene as an image.
2) In the 3D Viewer one can change the view with the mouse but I have not figured out how to get the actual 3D transformation matrix back to Matlab.
3) While one can zoom with the Mouse scroll button, there appears to be no such function available to control the viewer from Matlab. A workaround is to compute the 3D transformation matrix for objects in Matlab but I could only make that work for objects and not for the view of the Universe.
Comment) The Transformation Matrix in Java3d is not the usual Rotation*Scaling*Translation. Translation is appended as 4th column.
When I attempt to run any of the demos, a blank ImageJ 3D Viewer window appears. Clicking any of the dropdown menus on the ImageJ 3D Viewer leaves "ghosts".
When I close the ImageJ 3D Viewer window, the following error occurs:
// Error message begin
at javax.media.j3d.NativePipeline.createNewContext(Native Method)
Exception occurred in RenderingErrorListener:
// Error message ends.
I am using MATLAB 2012a. I have already run the InstallJava3D.m file and got the following output:
Testing if Java3D is already installed...
Java3D is already installed.
Installed version is 1.5.
This is good enough, you have nothing to do.
@Shalin: the sealing violation exception is caused by Lion being shipped with an old version of Java3D. If you just run the InstallJava3D script in MATLAB, this will fix the problem.
@Shalin: Hi Shalin! Could you contact me off-list so that we can try to fix this? This is a rather obscure error, at least to me. Best, jy.
Hello, Nice work. I am running into problems with MATLAB R2011b on MAC OS Lion (Java VM Version: Java 1.6.0_29-b11-402-11M3527 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode) .
When I try to execute universe.show() from the first demonstration, I encounter following error. It looks like a permission related issue, but I cannot figure out how to resolve this.
Error using ij3d.Image3DUniverse/show
Java exception occurred:
java.lang.SecurityException: sealing violation: package javax.media.j3d is sealed
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
Looks like you fixed it!
Thanks a lot!
Here comes your 5-stars rating...
@Ran: I think I found the problem.
Could you update Fiji, make sure scripts/Miji.m is listed in the update, relaunch Fiji (mandatory), then try again?
@Ran: Hi, could you contact me via e-mail so that we sort this out?
I would love to give it 5-stars rating but unfortunately I keep running into the same problem:
??? Undefined variable "ij3d" or class "ij3d.Image3DUniverse".
Error in ==> Matlab3DViewerDemo_1 at 110
universe = ij3d.Image3DUniverse();
For example, I use the demo:
works perfect, also returns "nFrames = 1". Next I do:
>> clear variables
And then I get the error above. I managed to re-run the demo successfully only if I close the Matlab session and open a new one.
I use windows 7 64-bit and Matlab R2010a.
I will appreciate any help, thanks!
It is fixed; you just have to update Fiji. I added a check for the bin folder, where, on windows platform, the dlls go.
Is this resolved? Otherwise, the exact and full error message would be quite useful for people who try to help... :-)
Okay, just emailed you the output from running InstallJava3D.
Can you send me the Matlab output so that I can try and fix this?
Also, the m-files are in the fiji/scripts folder.
Followed the directions, but the Java3D library won't install. IsJava3DInstalled returns 1, but something isn't right. Not sure what's up. I get an error at the call to ij3d in the first demo.
Also, .m files would be preferable to .html files for the demo.
Added a new demo file, relating how to generate surface plots: a 3D surface is generated from a 2D image, interpreting pixel value as elevation. Thanks to the recent work of Johannes on Fiji 3D viewer.
Changed the InstallJava3D script for windows installations.
Minor tyop in the title.