[ImageJ-devel] ImageJ Custom UI and preprocessors

Mongis Cyril cyril.mongis at googlemail.com
Thu Apr 30 04:34:06 CDT 2015


Dear Mark,

Thanks for your help. I used a ImageJ2 command to open the image (the
OpenFile.class module) so the display service knows what's the actual
display :-) I guess it's a preprocessor issue then... I'm gonna implement
my own preprocessor that triggers JavaFX.

The source code is now a bit messy for now but as soon as I get something
clean, I will publish it on Github. JavaFx is a great improvement compared
to swing that really worth the look. For instance, I will use a Webview
associated with Angular JS and a JSON Object Mapper to create a little
embedded web app that list of all modules, and display informations about
them like input, output etc. I also created some kind of new "special
widget" for browsing through N-Dimensional images. I will publish a demo
video when it's fully operational ;-)

I keep you up ;-)

Cheers everyone,

Cyril MONGIS


2015-04-29 15:20 GMT+02:00 Mark Hiner <hiner at wisc.edu>:

> 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/20150430/e8bfe5ea/attachment.html>


More information about the ImageJ-devel mailing list