Hi Kenneth,
> should I be surprised that the image is DISPLAYED? My plugin wants
> the ImageProcessor, and will use it to create a custom ImagePlus (with
> a few minor extensions).
Try using the loci.plugins.BF API. It is intended for use from Java
libraries and plugins.
import loci.plugins.BF;
...
String file = "/path/to/your/data.hdr";
ImagePlus[] imps = BF.openImagePlus(file);
If you need more control over how the images are opened, you can set them
using ImporterOptions; see here for details:
https://imagej.net/Bio-Formats#ScriptingRegards,
Curtis
--
Curtis Rueden
Software architect, LOCI/Eliceiri lab -
https://loci.wisc.edu/softwareImageJ2 lead, Fiji maintainer -
https://imagej.net/User:RuedenHave you tried the Image.sc Forum?
https://forum.image.sc/On Tue, Aug 25, 2020 at 2:34 PM Kenneth Sloan <
[hidden email]>
wrote:
> I'm dealing with a new (to me) image format. I have two very similar
> images, with extensions .hdr and .img. Both behave the same.
>
> When I call (from Java):
>
> ImagePlus ipl = IJ.openImage(path);
>
> ...the Bio-Formats Import Options screen appears.
> I accept all defaults (I've also tried "Standard ImageJ" instead of
> "Hyperstack") and a single image is displayed (perhaps it's actually a
> one-slice stack?)
>
> But, ipl is null!
>
> I'm going to workaround this by saving the image as a .tif and proceed
> from there - but I thought I'd ask: "what am I doing wrong"?
>
> Question 2 - should I be surprised that the image is DISPLAYED? My plugin
> wants the ImageProcessor, and will use it to create a custom ImagePlus
> (with a few minor extensions). I'm guessing that once Bio-Formats is
> called, all bets are off?
>
> --
> Kenneth Sloan
>
[hidden email]
> Vision is the art of seeing what is invisible to others.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html