Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Graphics Forums > Graphics in general
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Graphics in general Show all you general graphics here and get tips or ask questions.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 06-11-2007, 10:26 PM   #1
Jason Wong
 
Jason Wong's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Hi, I'm trying to figure out how to use Photoshop for scientific image
analysis purposes. I'm doing some neuroscience research, and what I
need to analyze is the intensity in certain brain regions created by a
specific staining technique. So what I was thinking of doing is using
the square marquee of Fixed Size to anaylze a square from Region A, and
compare that to a same area in Region B. What confuses me the most is
if I do Image --> Histogram, the value for Mean seems to be inversly
proportional to the staining intensity. i.e., if the region is darkly
stained I get a small Mean value and vice versa.

Does anyone know what I'm talking about? Is there a specific formula I
would use in order to determin the relative optical density of a certain
region? Any help would be greatly appreciated!

-- Jason

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 06-11-2007, 10:26 PM   #2
John Stafford
 
John Stafford's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Jason Wong wrote:
> Hi, I'm trying to figure out how to use Photoshop for scientific image
> analysis purposes. [...]


Might this program be helpfull? I don't know.
http://www.reindeergraphics.com/foveapro/classify.shtml

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:26 PM   #3
Mike Russell
 
Mike Russell's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Don wrote:
> The number you are reading is the brightness of the spot from 0-255,
> not the density. The density in absolute terms is therefore
> porportional to the inverse of the number, or in density numbers to
> the log(10) of the inverse of the number/255.


Correct. Also, don't forget gamma. This is an exponential funciton applied
to the data before it is displayed. In practical terms this means an image
value of 128 will be somewhat darker than 50% intensty.

You may set a custom working space with a gamma of 1.0 to eliminate this.

--

Mike Russell
http://www.curvemeister.com
http://www.zocalo.net/~mgr
http://geigy.2y.net


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:27 PM   #4
Jason Wong
 
Jason Wong's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Well Fovea Pro sounds like a great program but at $800 I don't think I
can afford it! Is there no other way to do this manually? Like as
someone said before can I take the log of the intensity to get
density?
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:27 PM   #5
Bart van der Wolf
 
Bart van der Wolf's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)


"Jason Wong" <7jw6@qlink.queensu.ca> wrote in message
news:a07dedf1.0308011607.101f428b@posting.google.c om...
> Well Fovea Pro sounds like a great program but at $800 I don't think I
> can afford it! Is there no other way to do this manually? Like as
> someone said before can I take the log of the intensity to get
> density?


Photoshop unfortunately only reports in 8-bit/channel values, even for (15
or) 16-b/ch values. So you are limited to a relative (to the brightest
pixel) Optical Density range of 0.0-2.4 . If that is enough for your
purpose, there seems to be no other way than calculating by hand, or using a
look-up table. As mentioned, make sure the image data is in Gamma 1 space.

Maybe, I'm not sure because my trial period expired, Picture Window (Pro for
16-b/ch) has such a functionality? Check http://www.dl-c.com for details.

Bart


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:27 PM   #6
DrJohnRuss
 
DrJohnRuss's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

>7jw6@qlink.queensu.ca (Jason Wong) writes
>
>Well Fovea Pro sounds like a great program but at $800 I don't think I
>can afford it!


If 8 bit data (effectively limiting you to densities below about 2.3) are
sufficient for your needs, then the Image Processing Tool Kit (also from
www.reindeergraphics.com) will give you the same functionality as Fovea Pro for
about $250. To judge the price, you need to compare the package to
"professional" image analysis software that does densitometry. These packages
(e.g., Image Pro Plus) typically cost $3K and up.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:30 PM   #7
Timo Autiokari
 
Timo Autiokari's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Jason Wong <7jw6@qlink.queensu.ca> wrote:

>Hi, I'm trying to figure out how to use Photoshop
>for scientific image analysis purposes.


Photoshop has some "enhancements" that makes it is rather difficult to
utilize it for scientific purposes.

>I need to analyze is the intensity in certain brain
>regions created by a specific staining technique.


What is it that gives the "intensities"? X-ray film or something else?


>I was thinking of doing is using the square marquee
>of Fixed Size to anaylze a square from Region A, and
>compare that to a same area in Region B. What confuses
>me the most is if I do Image --> Histogram, the value
>for Mean seems to be inversly proportional to the
>staining intensity.


The relation depends on the working-space gamma, among other things.

>i.e., if the region is darkly stained I
>get a small Mean value and vice versa.


Yes, the relative whitepoint is RGB=255,255,255, from there on it gets
darker and darker as you approach to level RGB=0,0,0.

>Is there a specific formula I would use in order
>to determin the relative optical density of a
>certain region?


Yes there is but one needs to know what the source is, it has to have a
known relation to density in the first place.

Timo Autiokari http://www.aim-dtp.net
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:32 PM   #8
Tom Nelson
 
Tom Nelson's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

In article <SPvXa.63741$uu5.6238@sccrnsc04>, Leonard Evens
<len@math.northwestern.edu> wrote:

> Photoshop starts with values in the range 0..255 (for each channel)
> obtained from some source. That source could be a digital camera or
> more likely in your case a scanner used to scan the Xray film. One
> would have to know just what that device is doing in creating the values
> 0..255. For example, Vuescan used in conjunction with one of the
> standard film scanners can actually show what Ed Hamrick tells us is the
> density of the film at each point in the scan. I haven't checked
> with a densitometer to see if his values are accurate, but they
> certainly seem to be in the right ball park of what I would expect. But
> his software, as does any scanning software, converts the density values
> to RGB values in the range 0..255. How it does it depends on some
> parameters, including the white and black points and a value of gamma.
> Since the aim in scanning is to get a usable image, whatever the density
> range in the source, it is going to be difficult to relate the latter
> values to density.


Most scanning software allows you to save scanning parameters. Might
you prepare a slide with the maximum possible stain next to an
unstained area? You could relate those densities to 0 and 255,
respectively, and use that setting for your test slides.
Tom Nelson
Tom Nelson Photography
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 10:32 PM   #9
Mike Russell
 
Mike Russell's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

> Jason Wong wrote:
>> Hi, I'm trying to figure out how to use Photoshop for scientific
>> image analysis purposes. I'm doing some neuroscience research, and
>> what I need to analyze is the intensity in certain brain regions
>> created by a specific staining technique. So what I was thinking of
>> doing is using the square marquee of Fixed Size to anaylze a square
>> from Region A, and compare that to a same area in Region B. What
>> confuses me the most is if I do Image --> Histogram, the value for
>> Mean seems to be inversly proportional to the staining intensity.
>> i.e., if the region is darkly stained I get a small Mean value and
>> vice versa.
>>
>> Does anyone know what I'm talking about? Is there a specific
>> formula I would use in order to determin the relative optical
>> density of a certain region? Any help would be greatly appreciated!


I've been thinking some more about this.

Most, if not all, of the replies to your question have concentrated on the
numeric conversion of RGB values to density. This response is centered on
your need to calculate the average density of a selected area, thereby
getting the value of the total amount of stain absorbed by a particular area
of a cell.

Density is minus the log of the fraction of transmitted light, aka
transparency. For example, clear film would have a transparencyof 1.0 and a
density of -log(1.0) = 0.0. An area of film that transmits 1/100 of the
light would have a density of -log(.01) = 2.0.

In black and white film density is proportional to the mass of silver per
unit area, and this corresponds to your goal of measuring the mass of stain
absorbed in a particular area of the cell. I cannot think of an exact way
to do this in Photoshop because it deals in luminance directly, and not the
log of luminance.

1) avoid gamma issues by converting the image to Lab mode.

2) You will need to calibrate the luminance values by matching a couple of
density points, using using a specimen with known density values. This
amounts to subtracting the background density from your measurements, and
scaling to match a maximum density. Once this is done, you may read
luminance values from your 50% means a 50% tranaparency value, or a density
of -log(.5) = .30

3) selecting an area with the lasso will .cause Image>Histogram to display
the average percent lightness of that area.

4) Subtracting that number from 100 and taking the log will give you an
accurate density only if the stain for that area is uniform. If there is
much variation in density, the result will be only an approximate average
density.

Unfortunately, at the end of the day, the density number yielded by this
method is based on an average transparency, and not an average density.

The problem with that is this. Consider a stained area consisting of a
checkerboard of .1 and 1.0 transparency , corresponding to density values of
1.0 and 0.0, respectively. The average transparency will be .55, and the
density calculated from this would be -log(.55) = .25, and not the correct
value of .5. If your subject does not vary much in density, the numbers
just might be accurate enough using this method. My guess is not.

One solution to this is to save the image as a 16 bit grayscale (the raw
file format is probably easiest to deal with), and write a C or Visual Basic
program to take the logs. You may then open this image in Photoshop, and
use the histogram tool to measure density values directly.

Another solution would be to have a custom plugin written to do this
calculation. If this is a university setting, and you have student cycles
available this could be very reasonable solution to your problem. Or hire a
summer student.

There is also a Macintosh only program called NIH image that will do a
variety of quantitative measurements of images:
see <http://rsb.info.nih.gov/nih-image/>


--

Mike Russell
http://www.curvemeister.com
http://www.zocalo.net/~mgr
http://geigy.2y.net


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 06-11-2007, 11:07 PM   #10
Jason Wong
 
Jason Wong's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Densitometry (or relative optical density)

Thanks everyone for the helpful replies. However I'm still a little
befuddled and confused as to what to do... I've switched to trying to
learn ImageJ, a java based image analysis program which is the PC
version of NIH Image (produced by the National Institute of Health).
But I think I'm back to where I started, basically I don't think I can
convert my mean values to density without some kind of calibration
step tablet or something like that. Here's a copy of the message I
just wrote to two other forums for help with ImageJ. Hopefully this
will clear up what I wanted to do and maybe someone can tell me how to
do it (easily preferrably!) in either photoshop or ImageJ. Thanks!

----

Hello, I'm trying to analyze hippocampal brain slices which I have
been immunostained for a neuronal marker (SNAP-25). All areas of the
slice in which synaptic connections are occurring are stained brown,
so the only unstained areas are where no tissue exists or where cell
bodies are located. The hippocampus is composed of several regions of
different neuron types (e.g. CA1, CA3, dentate gyrus), which are
clearly demarked using this stain by differential staining
intensities. However due to difficulties with the staining protocol,
staining intensities were not uniform from day to day, brain to brain,
and even parallel slice to slice. So to normalize this, I'm going to
be dealing with ratios between one hippocampal region and another.

So far I've converted my RGB images to 8-bit grayscale by selecting
Image -> Type -> 8-bit. I then openned up an image of a scale bar
used to set the scale by selecting Analyze -> Set Scale. Next I drew
a rectangle area selection tool to draw a square of fixed area (88
squared pixels). I then moved the square to the CA1 region, and
recorded the mean gray value by selecting Analyze -> Measure. Finally
I moved the selection square to record the mean gray value for a total
of 3 regions per image.

What I'm mostly confused with is what the mean gray value actually
MEANS. For the darker regions, I get a lower mean value but for the
lighter regions, I get a greater one. That seems to go against what I
would think of intuitively of what I actually want -- which is pixel
density. So if region A is darker than region C, I'd get a larger
value for region A. Final analysis would involve taking the ration of
A to C and comparing it with another region, such as B to C.

Someone mentioned something about calibrating my images. I'm not too
sure what this means or entails, but I don't think I have access to a
calibrated optical density step tablet. I don't know if that would
help either because each image I took might have slight changes in
brightness as I often fiddled around with the imaging system to
produce the best "looking" picture. But I figure the ratios idea will
help solve that dilema.

If anyone can understand what I'm trying to do and give me some help,
please please please do! Thank you
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optical Mouse clarise Computer Accessories 11 09-17-2007 2:20 PM
Wii Optical Disc question Tashfeen Bhimdi Computer Consoles 10 05-30-2007 10:04 PM


Featured Websites




All times are GMT +1. The time now is 10:32 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98