comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 3D histogram + sensible thresholding
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: 3D histogram + sensible thresholding [message #40515] Sat, 14 August 2004 15:35 Go to next message
dow is currently offline  dow
Messages: 5
Registered: August 2004
Junior Member
Hi David,

Thanks for your suggestions.

David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b86b24e166a1ab5989830@news.frii.com>...
>
> I don't know of anything built into IDL, but it
> would be easy to build yourself. You could easily,
> for example, figure out how to do a 1 standard deviation
> stretch, or something of the sort.

Could that fairly easily be built into XSTRETCH?

> There is nothing in the histogram part of XSTRETCH that
> precludes using a 3D array. The only thing 2D about XSTRETCH
> is that it assumes a 2D image array to display.

So if I modify the code to display one slice of the 3D array it should
work? The histogram would represent the 3D data?

> What would you be displaying in a 3D array?

We've communicated about my data before - you might remember the x-ray
tomography data of air and water flow in soils I showed you when you
were in Copenhagen. I didn't use my full name (Dorthe Wildenschild)
when I signed up for the news group.
I've got data sets that are spread differently across the "color"
(grey scale) spectrum, so I'm trying to find a threshold for one phase
(the air) that will work for several volumes representing different
saturations. Xstretch is such a nice tool for playing around with the
cutoff, but I would like to take a more scientific approach than
setting it to the value I think "looks" best.

Cheers,
Dorthe
Re: 3D histogram + sensible thresholding [message #40522 is a reply to message #40515] Fri, 13 August 2004 11:11 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dee writes:

> Any opinions out there on what is the most sensible/intelligent way to
> set a histogram threshold for grey scale data using IDL? Does IDL have
> some kind of function that will optimize your threshold given some
> kind of norm?

I don't know of anything built into IDL, but it
would be easy to build yourself. You could easily,
for example, figure out how to do a 1 standard deviation
stretch, or something of the sort.

> Also, has anyone written a script to make histograms for 3D arrays?
> I've happily used Dave Fanning's beautiful XSTRETCH code, but it only
> works for 2D. Have you extended it to 3D perhaps, Dave?

There is nothing in the histogram part of XSTRETCH that
precludes using a 3D array. The only thing 2D about XSTRETCH
is that it assumes a 2D image array to display.

What would you be displaying in a 3D array?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: 3D histogram + sensible thresholding [message #40599 is a reply to message #40515] Mon, 16 August 2004 21:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dee (nee Dorthe) writes:

>> I don't know of anything built into IDL, but it
>> would be easy to build yourself. You could easily,
>> for example, figure out how to do a 1 standard deviation
>> stretch, or something of the sort.
>
> Could that fairly easily be built into XSTRETCH?

I think it *was* built into XSTRETCH, but I took it out
because of all the people complaining about me mucking
with their data without warning them. :-)

(Actually, I think I probably do some sort of 2% linear
stretch, an idea I stole from ENVI many years ago. But
yes, this is easily set as the default stretch, if you
wanted it to be.)

>> There is nothing in the histogram part of XSTRETCH that
>> precludes using a 3D array. The only thing 2D about XSTRETCH
>> is that it assumes a 2D image array to display.
>
> So if I modify the code to display one slice of the 3D array it should
> work? The histogram would represent the 3D data?

Yes, certainly.

> We've communicated about my data before - you might remember the x-ray
> tomography data of air and water flow in soils I showed you when you
> were in Copenhagen. I didn't use my full name (Dorthe Wildenschild)
> when I signed up for the news group.

Sneaky, sneaky. But we *always* learn everything we
need to know about a person. :-)

> I've got data sets that are spread differently across the "color"
> (grey scale) spectrum, so I'm trying to find a threshold for one phase
> (the air) that will work for several volumes representing different
> saturations. Xstretch is such a nice tool for playing around with the
> cutoff, but I would like to take a more scientific approach than
> setting it to the value I think "looks" best.

Well, then you have to find some theoretical or physical
value that you can defend against the naysayers. But that's
science, not computer graphics. I make it a point to always
deal with the latter, if possible. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: animate loaded images
Next Topic: IDL implementation of the rolling ball background subtraction algorithm

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:26:43 PDT 2025

Total time taken to generate the page: 1.59888 seconds