Login  Register

Iterating through micron pixels

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

Iterating through micron pixels

perpetuum_mobile
Greetings,

I'm writing a plugin in Jython and I came up with the following issue:

Given an Image stack of tiff files (originating from a .dv file which has been converted to an tiff-image stack). Now considering the image number 28 in the stack.

I want to get the pixel values for each pixel on that image/slice (yes, I am aware of the runtime and memory usage, however the images are small enough that it works pretty well and sufficiently fast).
It currently works as followed:

"cp = stack.getProcessor(slice_number)
  #cp.getCalibrationTable()
  list_of_pixVal_by_coor = []
  for y in range(cp.getHeight()):
    for x in range(cp.getWidth()):"

It iterates through each pixel of the image. However it misses certain values. There I came up that the images have the dimension of 153x138 pixels. That is so far so good. However I also see that it has the dimensions of 16.45x14.84 microns. If I am with the mouse over the image at a specific position it gives me the coordinates in microns. Yet, the function mentioned above, iterates through each pixel, not micron coordinate.

- Is it possible to iterate through each micron x and micron y coordinate?
- if not, how to convert best to pixels/get all values. What do I mean by 'all values'? Well, I know that the highest pixel value shall be 209 at a specific micron position. But iterating through pixels I get as the highest pixel value 153, which means that the iteration over micron coordinates is much more precise then the iteration of pixel coordinates, ...at least that's what I am assuming, so please correct me here, due to the fact I am uncertain about the representation behaviour of microns and pixels in Fiji

Than you in advance for any hints in advance and

with best regards

Dan