Problem reading images, when not using ImageJ as plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem reading images, when not using ImageJ as plugin

Dennis Hendriksen
Hello,
 When using ImageJ's Image classes in a test application I cannot read
imagefiles into a ImagePlus or ImageStack object.
All works well when writing Plugins. For example:
 ImagePlus iPlus = new ImagePlus(validPath + ".bmp");
System.out.println(iPlus.getHeight() + ", " + iPlus.getWidth());
 results in height and width 0. When adding the ImagePlus to an ImageStack
and requesting the pixeldata also an error accured.
The same problem occurs when using the ImagePlus(String, Image) constructor.
 Anyone who knows what's going wrong?
 Thanks in advance,
Dennis