ImageJ List:
Okay, I am trying another tack. How hard would it be to add to ImageJ an array on the X axis mapping from pixel X coordinates to a floating point numbers. So ImageJ would report floating point numbers for X instead of pixel coordinates. Similarly for the Y axis. Seems like adding float realxcoords[NUMBER_OF_PIXELS_IN_WIDTH]; and float realycoords[NUMBER_OF_PIXELS_IN_HEIGHT]; would be a fairly simple addition, except that we need a format to support it. TIFF? Or pair the images with another file? I don't really want to carry around the baggage of a 3D tool when it isn't warranted. If this is already in ImageJ, let me know. If you zoom in you could possibly do some kind of interpolation of the axes. You would have to choose which part of the pixel really was the location of the floating point number. If the floating point coordinate file isn't found, then you could fall back to initializing the arrays to pixel coordinates. If we were to add such a feature to ImageJ, how would we get it integrated into the release? Does this sound like a valuable feature to people? I am thinking we could add this to the FloatProcessor, if we added an extra line of pixels on two perpendicular sides of the image, and added some kind of flag notifying the program to intepret these lines as real axes. What do people think? John |
On Tuesday 10 January 2006 17:59, John Carlson wrote:
> Okay, I am trying another tack. How > hard would it be to add to ImageJ an array > on the X axis mapping from pixel X coordinates > to a floating point numbers. So ImageJ > would report floating point numbers for X instead > of pixel coordinates. Similarly for the Y > axis. Images are made of discrete sampled points, so calibrated images already return real values from the coordinates. What would your use this for? Cheers, Gabriel |
What do you mean by calibrated image? How do you do that in ImageJ?
I would need to query the x and y coordinates for their values that were obtained from the file format we are using. John At 12:59 PM 1/10/2006, you wrote: >On Tuesday 10 January 2006 17:59, John Carlson wrote: > > Okay, I am trying another tack. How > > hard would it be to add to ImageJ an array > > on the X axis mapping from pixel X coordinates > > to a floating point numbers. So ImageJ > > would report floating point numbers for X instead > > of pixel coordinates. Similarly for the Y > > axis. > >Images are made of discrete sampled points, so calibrated images already >return real values from the coordinates. > >What would your use this for? > >Cheers, > >Gabriel |
On Tuesday 10 January 2006 22:54, John Carlson wrote:
> What do you mean by calibrated image? How do you do that in ImageJ? Image>Properties and then you put the value of the pixel size in your real units. You should have calculated beforehand what the calibration values should be. If you point to any pixels, you get the calibrated coordinates in the statusbar (instead of in pixels). This will be offset to 0,0, so you will only need to add/subtract any offset you need. The calibration is saved in the tiff format. You could store the offsets as metadata in the tiff tags and make a macro that reads them and converts to your chosen units in the statusbar or to a new window. > I would need to query the x and y coordinates for their values that were > obtained from the file format we are using. But the image is made of discrete units, so you will not be able to get more resolution than the image that holds the data. The coordinates would be transformed only. If such modification to the calibration was to be made, then one suggestion is to have a dialog that asks for the coordinates (in calibrated units) of the top left image pixel (0,0) and that one of the lower bottom pixel (getWidth()-1, getHeight()-1). As I said, you could incorporate these calculations in your own macro or plugin and store them as metadata. I hope it helps. Gabriel |
In reply to this post by Zummy
> Okay, I am trying another tack. How
> hard would it be to add to ImageJ an array > on the X axis mapping from pixel X coordinates > to a floating point numbers. So ImageJ > would report floating point numbers for X instead > of pixel coordinates. Similarly for the Y > axis. > Perhaps I am misunderstanding your intent, but if you use Analyze | Set Scale from the menu, you get JUST this effect. The units under the cursor can show in any real units you want: feet, um, cm, inchs, whatever. All you need to do is put in the real distance corresponding to some pixel distance. You can even scale differently in the x and y direction for the situation where you have non-square pixels. Although .tif files let you save the information with the image, the menu approach will work with any image, e.g. .jpg or .gif. If you want to permenantly associate the behavior with the image, set the scale and save it as a .tif which can be recovered the next time you analyze the same image. Rob ____________________________ Robert W. Baer, Ph.D. Associate Professor Department of Physiology A. T. Still University of Health Science 800 W. Jefferson St. Kirksville, MO 63501-1497 USA > ImageJ List: > > Seems like adding > > float realxcoords[NUMBER_OF_PIXELS_IN_WIDTH]; > and > float realycoords[NUMBER_OF_PIXELS_IN_HEIGHT]; > > would be a fairly simple addition, except > that we need a format to support it. TIFF? > Or pair the images with another file? > > I don't really want to carry around the baggage > of a 3D tool when it isn't warranted. > > If this is already in ImageJ, let me know. > > If you zoom in you could possibly do > some kind of interpolation of the axes. You > would have to choose which part of the pixel > really was the location of the floating point number. > > If the floating point coordinate file isn't found, then you could > fall back to initializing the arrays to pixel coordinates. > > If we were to add such a feature to ImageJ, how would > we get it integrated into the release? > > Does this sound like a valuable feature to people? > > I am thinking we could add this to the FloatProcessor, if > we added an extra line of pixels on two perpendicular sides of > the image, and added some kind of flag notifying the program > to intepret these lines as real axes. > > What do people think? > > John > |
In reply to this post by Gabriel Landini
The "Set Scale" feature would be slightly more useful to me if it included
the offset, since my images often represent contour maps that are defined in a specific coordinate system. The user interface for that could be to add boxes for "x value of left side" and "y value of top", or something equivalent. (I can't find the z slice spacing input at the moment...). With no input, the values would be zero, and the behavior would be the way it is now. Cropping and canvas size adjustments would need to change the offsets. If the offsets have not been deliberately set, then cropping, etc., should probably not change them. I'm not sure what to suggest for that. The new information would need to be stuffed into tiff files somehow. Bob Robert P. Dougherty, Ph.D. President, OptiNav, Inc. Phone (425) 467-1118 Fax (425) 467-1119 www.optinav.com > -----Original Message----- > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of > Gabriel Landini > Sent: Wednesday, January 11, 2006 1:45 AM > To: [hidden email] > Subject: Re: adding real axes to pixel format, possible addition to ImageJ > > On Tuesday 10 January 2006 22:54, John Carlson wrote: > > What do you mean by calibrated image? How do you do that in ImageJ? > > Image>Properties and then you put the value of the pixel size in your real > units. You should have calculated beforehand what the calibration values > should be. > If you point to any pixels, you get the calibrated coordinates in the > statusbar (instead of in pixels). This will be offset to 0,0, so you will > only need to add/subtract any offset you need. The calibration is saved in > the tiff format. You could store the offsets as metadata in the tiff tags > and > make a macro that reads them and converts to your chosen units in the > statusbar or to a new window. > > > I would need to query the x and y coordinates for their values that were > > obtained from the file format we are using. > > But the image is made of discrete units, so you will not be able to get > more > resolution than the image that holds the data. The coordinates would be > transformed only. > > If such modification to the calibration was to be made, then one > suggestion is > to have a dialog that asks for the coordinates (in calibrated units) of > the > top left image pixel (0,0) and that one of the lower bottom pixel > (getWidth()-1, getHeight()-1). > As I said, you could incorporate these calculations in your own macro or > plugin and store them as metadata. > > I hope it helps. > > Gabriel |
In reply to this post by Gabriel Landini
I will look at the code to see how to do this from Java (we will launch ImageJ
from a Java applet). This sounds very promising. We have a lot more requirements than that, but if we can get basic floating point scales on the x and y axes, that will go quite a distance towards meeting our goals. I still need to find out the requirements for the axes, whether they will be spaced evenly or not. John At 01:45 AM 1/11/2006, Gabriel Landini wrote: >On Tuesday 10 January 2006 22:54, John Carlson wrote: > > What do you mean by calibrated image? How do you do that in ImageJ? > >Image>Properties and then you put the value of the pixel size in your real >units. You should have calculated beforehand what the calibration values >should be. >If you point to any pixels, you get the calibrated coordinates in the >statusbar (instead of in pixels). This will be offset to 0,0, so you will >only need to add/subtract any offset you need. The calibration is saved in >the tiff format. You could store the offsets as metadata in the tiff tags and >make a macro that reads them and converts to your chosen units in the >statusbar or to a new window. > > > I would need to query the x and y coordinates for their values that were > > obtained from the file format we are using. > >But the image is made of discrete units, so you will not be able to get more >resolution than the image that holds the data. The coordinates would be >transformed only. > >If such modification to the calibration was to be made, then one >suggestion is >to have a dialog that asks for the coordinates (in calibrated units) of the >top left image pixel (0,0) and that one of the lower bottom pixel >(getWidth()-1, getHeight()-1). >As I said, you could incorporate these calculations in your own macro or >plugin and store them as metadata. > >I hope it helps. > >Gabriel |
Free forum by Nabble | Edit this page |