Starting with commands

Trying to get into the plugin/command structure of IJ2 and getting stuck with simple things already.
So, potentially a stupid beginners question regarding commands:

I start IJ from within Eclipse and automatically open the Lena image. This is displayed directly as a composite.
I then tried to create a duplicate e.g. by

duplicate = img.duplicate();

where duplicate is the output and img the input Dataset

At least I get it displayed :blush:

But then, the output image is contrast autoscaled and is displayed as a standard RGB image as in IJ1 and not in composite view. I tried to get a copy without autoscaling and as composite by experimenting around with DatasetView, the DataView and the ImageDisplay (which still confuses me to some extend :confused:) but without success.

I am well aware that this is surely simple, but even digging in the API is not bringing me forward.

Any short kick-start help is very much appreciated

Sounds like a bug, in either:

  • the Dataset.duplicate() method; or
  • the ImageJ legacy layer’s data synchronization.

As discussed at the hackathon, the Data :arrow_forward: DataView :arrow_forward: Display :arrow_forward: DisplayViewer hierarchy is slated for a simplified redesign very soon. So I would not worry too much about understanding it completely at this point.

Is there a concrete reason you are using the ImageJ2 data model, instead of sticking with ij.ImagePlus for now?

1 Like

Hi Curtis,

thanks for clarification.

not really, wanted to get into the new data structure. So, nothing urgent :smile: