Re: Getting the scale
Posted by
Cspr on
URL: http://imagej.273.s1.nabble.com/Getting-the-scale-tp3686642p3686649.html
Thank you again for your suggestion.
This just leaves one, rather interesting, quetion. How do you calculate the pixelWidth? It seems that the ScaleDialog.java file computes the distance (i.e. the pixel to micron ratio) as
measured = ((Line)roi).getRawLength();
length = IJ.d2s(measured, 2);
where roi is the getRoi method called on the image. I use the read_image example from
https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/utils/Read_Image.javato read an LIF file, but extracting a random image from that routine and displaying it returns a null when trying to use the imp.getRoi method. Creating a line and setting that as the ROI does nothing either. So i'm still very much troubled by this.