> Please excuse me for piggy-backing on this discussion, but…
>
> With the rise in Stack processing - are there similar mechanisms to record, remember, and report back on the depth of voxels? Simplest would be “getVoxelSize(unit, voxelWidth, voxelHeight, voxelDepth)” - but…I’ll take what I can get.
>
> Pressing my luck - it’s common for slices in a stack to be less regularly spaced than, say, rows in an image. Is there any mechanism for mapping slice number -> z value?
>
> —
> Kenneth Sloan
>
[hidden email] <mailto:
[hidden email]>
> Vision is the art of seeing what is invisible to others.
>
>> On Feb 1, 2016, at 07:45, BenDehap <
[hidden email]> wrote:
>>
>> Hello Michael,
>>
>> First thank you for your answer, someone give me a simple way to resolve my
>> problem as following :
>>
>>
>> getPixelSize (unit, pixelWidth, pixelHeight);
>> if (unit=="microns"){
>> x=pixelWidth;}
>> else exit ("No calibration");
>>
>> but i seen that the method you propose is widely used on forums.
>> Would it be possible to show me an example of code using "x" for the value
>> of the pixel witdh and "image1" for the name of my image.
>>
>> I don't know if you have the time to do it, but i'm a coding beginner and i
>> feell a bit lost.
>>
>> Thanks anyway.
>>
>> Ben
>>
>>
>> 2016-02-01 11:15 GMT+01:00 Michael Entrup [via ImageJ] <
>>
[hidden email]>:
>>
>>> Hi Ben,
>>>
>>> each ImagePlus [1] has a method called ``getCalibration()``. It returns
>>> the Calibration [2] instance of the ImagePlus. The Calibration Object
>>> contains all the methods you need. ``getUnit()`` returns a String to
>>> check if the unit is µm. ``getX(double x)`` converts a pixel value into
>>> a physical unit.
>>>
>>> Best regards
>>> Michael
>>>
>>> [1]:
http://rsb.info.nih.gov/ij/developer/api/ij/ImagePlus.html>>> [2]:
http://rsb.info.nih.gov/ij/developer/api/ij/measure/Calibration.html>>>
>>>
>>> On 31.01.2016 20:37, BenDehap wrote:
>>>
>>>> Hello,
>>>>
>>>> I have a simple problem and reading different forums didn't help me to
>>>> resolve it.
>>>>
>>>> I need for my ImageJ Plugins to attribute to a variable "x" the value of
>>> the
>>>> pixel size in "µm" used in my pre-calibrated "image1".
>>>>
>>>> It would really help me if someone can help me on this case.
>>>>
>>>> Thanks very much.
>>>>
>>>> Ben
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>
http://imagej.1557.x6.nabble.com/Get-the-pixel-Size-tp5015501.html>>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>>
>>>> --
>>>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>>>>
>>>
>>> --
>>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the discussion
>>> below:
>>>
http://imagej.1557.x6.nabble.com/Get-the-pixel-Size-tp5015501p5015507.html>>> To unsubscribe from Get the pixel Size, click here
>>> <
>>> .
>>> NAML
>>> <http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>
>>
>>
>>
>>
>> --
>> View this message in context:
http://imagej.1557.x6.nabble.com/Get-the-pixel-Size-tp5015501p5015510.html>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>