Hi everyone,
I’m trying to adjust a DatasetView
so that the data in my Dataset
would get displayed correctly. Basically I’m trying to achieve what in ImageJ1 world would look like
ImagePlus foo = new ImagePlus();
...
foo.getProcessor().setMinAndMax(0, value);
IJ.run("Fire");
foo.show();
What I’ve tried so far in my ImageJ2 plugin:
@Parameter
private ImageDisplay imageDisplay;
@Parameter
private UIService uiService;
@Override
public void run() {
// Calls the LocalThickness_ plugin and wraps the result in a Dataset
Dataset dataset = createMap();
uiService.show(dataset);
final DatasetView activeView = (DatasetView) imageDisplay.getActiveView();
activeView.autoScale(0);
activeView.setColorTable(net.imagej.display.ColorTables.FIRE, 0);
}
However the Dataset
is shown all white except for the last slide. You can’t tell the difference between the values by eye. They range from 0.0 to about 16.0 (LocalThickness produces a floating point ImagePlus).
Best Regards,
Richard Domander