new to image j

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

new to image j

Godfrey Pasirayi
Hello  I am in the process of completing my research and part of my work requires the analysis of images using Image J. The problem I have is to create a small macro that I can using to analyse a ROI in a  number of images. Can someone in the group assist me to get around this problem as a new user of image J. Secondly, when I try to find the logarithmic relationship between two images A and B ( Log10 (A/B))     the resultant image C is completely dark. My question is that,  Is there any scaling that needs to be done  so that I can see the image C clearly. I have tried to effect about 0.25% of enhanced contrast and the image is visible but not very clear.
  ( Log10 (A/B)) was obtained by selecting  Process - Image calculator -  A ( Blank SP) divide  B ( SP 0.6) and checking 32-bit - Math - Log -Math - dividing by 2.303 to give image C.  I wanted to attach the Pictures A and B but they have been rejected  Thank you so much for assistance. regards Godfrey

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: new to image j

Jim Passmore-2
Hi Godfrey,
I think the problem may be in the way images are displayed, and
specifically how the brightness is scaled, in ImageJ.  Every image format
has a range of pixel values, and that is mapped into a range of brightness
for display on the monitor.  In most cases, things work in an obvious way.
For instance, when you do the floating point (32 bit) image division, the
resulting range depends on the input images, but ImageJ appears to set the
displayed black level to the minimum of the new image range, and white to
the max.  However, running the log command, even though it again modifies
the min/max range, does *not* change the displayed black/white levels.  If
you open Image|Adjust|Brightness & Contrast and click reset or auto, that
should adjust the display mapping to something you can see.

Consider the following macro (watch out for extra line breaks!):

// Start macro
run("Dot Blot (7K)");
run("Duplicate...", "title=bkg");
run("Gaussian Blur...", "sigma=50");
imageCalculator("Divide create 32-bit", "Dot_Blot.jpg","bkg");
selectWindow("Result of Dot_Blot.jpg");
run("Log");
// If you stop here, the image is dark, with no contrast.

//run("Brightness/Contrast...");
resetMinAndMax();
// The image result can now be seen.
// End macro


On Wed, Apr 1, 2015 at 5:55 AM, Godfrey Pasirayi <
[hidden email]> wrote:

> Hello  I am in the process of completing my research and part of my work
> requires the analysis of images using Image J. The problem I have is to
> create a small macro that I can using to analyse a ROI in a  number of
> images. Can someone in the group assist me to get around this problem as a
> new user of image J. Secondly, when I try to find the logarithmic
> relationship between two images A and B ( Log10 (A/B))     the resultant
> image C is completely dark. My question is that,  Is there any scaling that
> needs to be done  so that I can see the image C clearly. I have tried to
> effect about 0.25% of enhanced contrast and the image is visible but not
> very clear.
>   ( Log10 (A/B)) was obtained by selecting  Process - Image calculator -
> A ( Blank SP) divide  B ( SP 0.6) and checking 32-bit - Math - Log -Math -
> dividing by 2.303 to give image C.  I wanted to attach the Pictures A and B
> but they have been rejected  Thank you so much for
> assistance. regards Godfrey
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>




*-- Jim Passmore*
Research Associate
Sealed Air Corporation

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: new to image j

Godfrey Pasirayi
Thank you so much Jim for the code and advice. I will try to code this and see how it works. Once again thank you for your valuable information.regards Godfrey


     On Wednesday, 1 April 2015, 14:19, Jim Passmore <[hidden email]> wrote:
   

 Hi Godfrey,
I think the problem may be in the way images are displayed, and
specifically how the brightness is scaled, in ImageJ.  Every image format
has a range of pixel values, and that is mapped into a range of brightness
for display on the monitor.  In most cases, things work in an obvious way.
For instance, when you do the floating point (32 bit) image division, the
resulting range depends on the input images, but ImageJ appears to set the
displayed black level to the minimum of the new image range, and white to
the max.  However, running the log command, even though it again modifies
the min/max range, does *not* change the displayed black/white levels.  If
you open Image|Adjust|Brightness & Contrast and click reset or auto, that
should adjust the display mapping to something you can see.

Consider the following macro (watch out for extra line breaks!):

// Start macro
run("Dot Blot (7K)");
run("Duplicate...", "title=bkg");
run("Gaussian Blur...", "sigma=50");
imageCalculator("Divide create 32-bit", "Dot_Blot.jpg","bkg");
selectWindow("Result of Dot_Blot.jpg");
run("Log");
// If you stop here, the image is dark, with no contrast.

//run("Brightness/Contrast...");
resetMinAndMax();
// The image result can now be seen.
// End macro


On Wed, Apr 1, 2015 at 5:55 AM, Godfrey Pasirayi <
[hidden email]> wrote:

> Hello  I am in the process of completing my research and part of my work
> requires the analysis of images using Image J. The problem I have is to
> create a small macro that I can using to analyse a ROI in a  number of
> images. Can someone in the group assist me to get around this problem as a
> new user of image J. Secondly, when I try to find the logarithmic
> relationship between two images A and B ( Log10 (A/B))    the resultant
> image C is completely dark. My question is that,  Is there any scaling that
> needs to be done  so that I can see the image C clearly. I have tried to
> effect about 0.25% of enhanced contrast and the image is visible but not
> very clear.
>  ( Log10 (A/B)) was obtained by selecting  Process - Image calculator -
> A ( Blank SP) divide  B ( SP 0.6) and checking 32-bit - Math - Log -Math -
> dividing by 2.303 to give image C.  I wanted to attach the Pictures A and B
> but they have been rejected  Thank you so much for
> assistance. regards Godfrey
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>




*-- Jim Passmore*
Research Associate
Sealed Air Corporation

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html