How to Use ImageJ-MATLAB
Even with the documentation, it took me quite some time to figure out how to launch ImageJ-MATLAB on MATLAB. The bottom line is that the ImageJ.m
file that is bundled with Fiji is not functional on purpose; you are supposed to update the file through the automatic updater. And the documentation above doesn't mention it!
- Install Fiji
-
Use MATLAB R2017b or later, which uses JAVA 1.8+ as ImageJ/Fiji does.
- Use the following command to check the JAVA version of MATLAB
matlab version -java
- Use the following command to check the JAVA version of MATLAB
Executing the following commands
addpath 'D:\Fiji.app\scripts\' % depends your Fiji installation
ImageJ
will bring a dialog which prompts you to add an update site http://sites.imagej.net/MATLAB/
.
- This means that, following the instruction of the web page, you go to
Fiji > Update...
Once checking status is done, open
Manage update sites
Tick
ImageJ-MATLAB
And then click
Apply changes
on ImageJ UpdaterThis will literally update and replace the existing, non-functional
ImageJ.m
file in the scripts folder with the genuine one.
Now ImageJ.m
runs in MATLAB
>> ImageJ
--------------------------------------------------------------
ImageJ-MATLAB 0.7.2: MATLAB to ImageJ Interface
--------------------------------------------------------------
JVM> Version: 1.8.0_121
JVM> Total amount of memory: 796160 Kb
JVM> Amount of free memory: 295252 Kb
-- Welcome to ImageJ-MATLAB --
ImageJ-MATLAB consists of an extensible set of commands for passing information between ImageJ and MATLAB.
See the individual sections below for a list of available commands.
For more information and examples see:
http://imagej.net/MATLAB-Scripting
--- MATLAB Command Plugins ---
-- ImageJ MATLAB commands --
Usage: IJM.[command]
help - prints a brief description of available commands
getDataset - creates a MATLAB matrix from the active ImageJ image
getDatasetAs(name) - creates a MATLAB matrix from the active ImageJ image, and assigns it to the specified variable name
show(name) - takes the MATLAB matrix with the specified name and displays it as an image
--------------------------------------------------------------
Status> ImageJ is running.
--------------------------------------------------------------
log4j:WARN No appenders could be found for logger (loci.formats.ClassList).
log4j:WARN Please initialize the log4j system properly.
PS. After this, I extensively edited the official documentation, so it should be much easier now.
Author And Source
この問題について(How to Use ImageJ-MATLAB), 我々は、より多くの情報をここで見つけました https://qiita.com/kouichi-c-nakamura/items/dd4706fd5d74cbfca2d4著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .