[ImageJ-devel] ImageJ Custom UI and preprocessors
Mark Hiner
hiner at wisc.edu
Wed Apr 29 08:20:40 CDT 2015
Hi Cyril,
>However, when I want to apply a Gaussian Blur (for instance), the software
sents back a message telling that the "dataset" input hasn't been provided.
I guess it's a preprocessor issue.
Another possibility is that there actually is no Dataset. A Dataset[1] is
an ImageJ2 construct, and by default would not be produced by opening an
image with an ImageJ 1.x command. You can ensure a Dataset is available by
using an ImageJ2 I/O plugin (e.g. File > Import > Image...) or turn on
synchronization[2]. Once we get the synchronization step to be more
performant, it will be made automatic.
>how is the preprocessing order decided ?
All Preprocessors[3] are SciJava Plugins, which are accessed in order of
priority[4,5]
>Could you point me to some existing preprocessor that does most of the
logic so I don't have to re-implement simple operations ?
The ActiveDataset preprocessor[6] is what populates single @Dataset
parameters. There's also an ImagePlus version[7] for making @ImagePlus work.
>http://cyrilmongis.net/img/imagejfx-screenshot.jpg
This is fantastic. Is your source code openly available? I'm interested in
JavaFX - for cross-platform distribution more than as a library, but would
still be great to see what you're doing.
Thanks for keeping us up to date, let us know how it goes and if you run
into any more roadblocks (or if any of this is unclear)!
Best,
Mark
[1]
https://github.com/imagej/imagej-common/blob/imagej-common-0.14.0/src/main/java/net/imagej/Dataset.java
[2] http://imagej.net/Compatibility#Translation_of_data_structures
[3]
https://github.com/scijava/scijava-common/blob/scijava-common-2.40.0/src/main/java/org/scijava/module/process/PreprocessorPlugin.java
[4]
https://github.com/scijava/scijava-common/blob/scijava-common-2.40.0/src/main/java/org/scijava/plugin/Plugin.java#L129
[5]
https://github.com/scijava/scijava-common/blob/scijava-common-2.40.0/src/main/java/org/scijava/Priority.java
[6]
https://github.com/imagej/imagej-common/blob/imagej-common-0.14.0/src/main/java/net/imagej/display/process/ActiveDatasetPreprocessor.java
[7]
https://github.com/imagej/imagej-legacy/blob/master/src/main/java/net/imagej/legacy/plugin/ActiveImagePlusPreprocessor.java
On Wed, Apr 29, 2015 at 3:17 AM, Mongis Cyril <cyril.mongis at googlemail.com>
wrote:
> Dear all,
>
> I'm actually integrating ImageJ in my PhD project. It leads me to
> implements a JavaFX UI for ImageJ. Thanks to Curtis's help, I have been
> able to support image opening and displaying. I'm now facing the issue of
> triggering the filling of parameters via the UI. My menu is generated via a
> MenuCreator implementation (the whole MenuCreator structure is a brillant
> idea by the way, it allowed to integrate the ImageJ Menu in no time !) and
> call the ShadowMenu.run() for the corresponding module. Applying LUT works
> (so I guess that getting the active display works). However, when I want to
> apply a Gaussian Blur (for instance), the software sents back a message
> telling that the "dataset" input hasn't been provided. I guess it's a
> preprocessor issue. I already did some digging about how preprocessor work
> (from the tutorial and from the code that I read), but I lacking
> explanations about the big picture. My main question is : which approach
> should I use make Imagej trigger my UI with some kind of auto-generated
> dialog ? Should I create my own preprocessor or just maybe implements some
> kind of UI binding used by an already existing preprocessor ? Since
> applying LUT seems to work, does it means several preprocessor are executed
> before a command is ran ? If yes, how is the preprocessing order decided ?
> Could you point me to some existing preprocessor that does most of the
> logic so I don't have to re-implement simple operations ?
>
>
> I joined a screenshot of the current state of the ImageJ integration :-)
> http://cyrilmongis.net/img/imagejfx-screenshot.jpg
>
> Cheers,
>
> Cyril MONGIS
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20150429/3506e1bd/attachment.html>
More information about the ImageJ-devel
mailing list