Posted by
Krs5 on
Aug 28, 2015; 7:38am
URL: http://imagej.273.s1.nabble.com/Automatically-set-scale-tp5014169p5014180.html
Hi Andrew,
The code snippet below allows the user to insert the distance in pixels without measuring it.
Dialog.create("Pixel distance");
Dialog.addNumber("Give distance in pixels for 1 mm" , 0);
Dialog.show();
pixel = Dialog.getNumber();
run("Set Scale...", "distance="+pixel+" known=1 pixel=1 unit=mm");
Best wishes
Kees
Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Andrew Sanchez
Sent: 28 August 2015 05:19
To:
[hidden email]
Subject: Re: Automatically set scale
Hi Ved,
The problem is that the distance in pixels which equals 1 mm will be different in every image, so I can't set it to a constant number like you suggested.
I need to set it to a variable which I can automatically fill with the correct distance in pixels for each unique image, based on an object of known size which we are using to set the scale.
I hope that makes sense.
Andrew
--
View this message in context:
http://imagej.1557.x6.nabble.com/Automatically-set-scale-tp5014169p5014178.htmlSent 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