Imagej Inversion for Dummies

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

Imagej Inversion for Dummies

serka
Hi all,

I have two images that I have to logarithmically transform and invert each, and then I have to subtract one image from the other.
To transform I have used process>math>log and to invert I used edit>invert.
The images do not look inverted after I do this, and the mean pixel value on my ROI is exactly the same after each process as it was on the original images, is that correct?
I know that invert LUT inverts the colour but I need the pixel values inverted.

I ask because when I subtract the images I get a completely black image and I'm trying to work out why.

Very confused imageJ novice.
Reply | Threaded
Open this post in threaded view
|

Re: Imagej Inversion for Dummies

GuyM
Hi
It's a bit hard to get a sense of what your images look like after the two transformations, but two things perhaps could be relevant:
Are you using RGB images or single channels? I've just checked the sample image "Fluorescent Cells", split it, performed "log" on it, and inverted, and the values changed as well.
Could it be that the pixel values are very narrow and thus it is difficult to see the ensuing changes?
Guy

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

Re: Imagej Inversion for Dummies

Herbie
In reply to this post by serka
Serka,

in cases like yours it is a good idea to use 32bit gray-level images.

In any case please consider what the ImageJ-Manual tells you:

__________________________
29.9.12 Log
For 8–bit images, applies the function f(p) = ln(p)  255= ln(255) to
each pixel (p) in the image
or selection. For RGB images, this function is applied to all three
color channels. For 16–bit
images, the image min and max are used for scaling instead of 255. For
float images, no scaling is
done. To calculate log10 of the image, multiply the result of this
operation by 0.4343 (1= ln(10)).
__________________________
27.11 Invert [I]
Creates a reversed image, similar to a photographic negative, of the
entire image or selection. For 8–bit and RGB images (see Image Types and
Formats), Invert always uses min = 0 and max = 255, regardless of the
data values. For 16–bit and 32–bit images, the actual minimum and
maximum are used (rather than the full range of the pixel type)
__________________________


HTH

Herbie

:::::::::::::::::::::::::::::::::::
Am 11.08.15 um 14:27 schrieb serka:

> Hi all,
>
> I have two images that I have to logarithmically transform and invert each,
> and then I have to subtract one image from the other.
> To transform I have used process>math>log and to invert I used edit>invert.
> The images do not look inverted after I do this, and the mean pixel value on
> my ROI is exactly the same after each process as it was on the original
> images, is that correct?
> I know that invert LUT inverts the colour but I need the pixel values
> inverted.
>
> I ask because when I subtract the images I get a completely black image and
> I'm trying to work out why.
>
> Very confused imageJ novice.
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Imagej-Inversion-for-Dummies-tp5013978.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
Reply | Threaded
Open this post in threaded view
|

Re: Imagej Inversion for Dummies

serka

I restarted my computer and the images are now behaving as expected, literally as simple as turning it off and on again, a little embarrassing actually!
But thank you both for your replies, great for helping me get the hang of ImageJ.