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

Home » Public Forums » archive » Re: iVolume isosurface placement
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: iVolume isosurface placement [message #47681] Fri, 24 February 2006 09:40
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> I'm planning to be in Boulder for a while this summer. How about a kegger in
> the RSI parking lot?

Yeah, let's do that. RSI is always up for sponsoring
these kinds of things. :-)

Cheers,

David

P.S. The last time I was up to RSI I noticed that ITT has
changed the, uh, culture a bit. When I called to get some
information no one answered the phone, and when I showed
up unannounced the front door was locked. (Apparently,
it is ALWAYS locked.) Friendly sort of place. Perfect
for a kegger. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: iVolume isosurface placement [message #47682 is a reply to message #47681] Fri, 24 February 2006 09:29 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.1e68e7ddea45b130989ba9@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:

> I'm nominating you for the Meritorious Service Award at this
> year's IEPA convention. :-)
>
> Cheers,
>
> David

I'm planning to be in Boulder for a while this summer. How about a kegger in
the RSI parking lot?

Ken
Re: iVolume isosurface placement [message #47683 is a reply to message #47682] Fri, 24 February 2006 08:40 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <pan.2006.02.24.16.22.07.969000@rsinc.com>,
Karl Schultz <k____schultz@rsinc.com> wrote:

> I think it is a bug in idlitvisisosurface__define.pro. The scaling should
> be accomplished with a value one less than the volume dimensions since the
> number of voxels is one less than the number of samples in each direction:
>
> ;; Prepare vertex data
> ;; - scale by dimensions
> oDimensions = self->GetParameter('VOLUME_DIMENSIONS')
> if OBJ_VALID(oDimensions) then begin
> success = oDimensions->GetData(dimensions)
> dimensions = FLOAT(dimensions)
> volDims = SIZE(*pVol, /DIMENSIONS)
> verts[0,*] *= dimensions[0] / (volDims[0]-1) ; change
> verts[1,*] *= dimensions[1] / (volDims[1]-1) ; change
> verts[2,*] *= dimensions[2] / (volDims[2]-1) ; change
> endif
>
>
> I'll file a bug report. But you should be able to apply this change
> yourself and get on with things. And yeah, you're right in that it is
> hard to notice with bigger volumes.

Thanks, Karl. You pointed me in this direction earlier, and I thought that I
tried exactly the change you suggest, but it didn't work. (Blunder on my part
no doubt ... not that I have any clue how idlitvisisosurface__define.pro works)
I just tried this again, and now everything is copacetic.

There is an existing bug report (198801), and I sent a follow-up with this
example earlier today.

Thanks again, Ken
Re: iVolume isosurface placement [message #47684 is a reply to message #47683] Fri, 24 February 2006 08:53 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> David Fanning <davidf@dfanning.com> wrote:
>
>> Kenneth Bowman writes:
>>
>>> I think the following example demonstrates the problem clearly.
>>
>> Nice example of the problem. How many hours did it take you? :-)
>>
>> Cheers,
>>
>> David
>
> Don't even ask.

I'm nominating you for the Meritorious Service Award at this
year's IEPA convention. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: iVolume isosurface placement [message #47685 is a reply to message #47683] Fri, 24 February 2006 08:29 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <MPG.1e68da9a7cb846f6989ba7@news.frii.com>,
David Fanning <davidf@dfanning.com> wrote:

> Kenneth Bowman writes:
>
>> I think the following example demonstrates the problem clearly.
>
> Nice example of the problem. How many hours did it take you? :-)
>
> Cheers,
>
> David

Don't even ask.

Ken
Re: iVolume isosurface placement [message #47687 is a reply to message #47685] Fri, 24 February 2006 08:22 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Fri, 24 Feb 2006 09:18:01 -0600, Kenneth Bowman wrote:

> I have been experimenting with iVolume in order to understand my problem with
> displaying isosurfaces.
>
> I think the following example demonstrates the problem clearly.
>
>
>
> n = 5
> x = FINDGEN(n)/(n-1)
> x3 = REBIN(REFORM(x, n, 1, 1), n, n, n)
> y3 = REBIN(REFORM(x, 1, n, 1), n, n, n)
> z3 = REBIN(REFORM(x, 1, 1, n), n, n, n)
> vol = z3 - SIN(!PI*x3)*SIN(!PI*y3)
>
> iVolume, vol, /NO_SAVEPROMPT, $
> VOLUME_LOCATION = [0.0, 0.0, 0.0], $
> VOLUME_DIMENSIONS = [1.0, 1.0, 1.0]
>
>
>
> After the volume is created, add an isosurface at the level 0.0 by using
> Operations...Volume...Isosurface.
>
> The peak in the surface should be at (x,y) = (0.5,0.5), not (0.4,0.4), and the
> isosurface should span the whole data space, 0 -> 1.
>
> Volume slicing (Operations...Volume...Image plane) and volume rendering
> operations do place the data correctly.
>
> If you have a lot of points in your data set, you may not care that isosurfaces
> are squeezed by one grid point in each direction, but for my purposes, this is
> causing me real problems.

I think it is a bug in idlitvisisosurface__define.pro. The scaling should
be accomplished with a value one less than the volume dimensions since the
number of voxels is one less than the number of samples in each direction:

;; Prepare vertex data
;; - scale by dimensions
oDimensions = self->GetParameter('VOLUME_DIMENSIONS')
if OBJ_VALID(oDimensions) then begin
success = oDimensions->GetData(dimensions)
dimensions = FLOAT(dimensions)
volDims = SIZE(*pVol, /DIMENSIONS)
verts[0,*] *= dimensions[0] / (volDims[0]-1) ; change
verts[1,*] *= dimensions[1] / (volDims[1]-1) ; change
verts[2,*] *= dimensions[2] / (volDims[2]-1) ; change
endif


I'll file a bug report. But you should be able to apply this change
yourself and get on with things. And yeah, you're right in that it is
hard to notice with bigger volumes.

Karl
Re: iVolume isosurface placement [message #47690 is a reply to message #47687] Fri, 24 February 2006 07:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

> I think the following example demonstrates the problem clearly.

Nice example of the problem. How many hours did it take you? :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: iVolume isosurface placement [message #47691 is a reply to message #47690] Fri, 24 February 2006 07:54 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> How do you do that? This option is grayed out for me. :-(

Oh, never mind. I figured it out.

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: iVolume isosurface placement [message #47693 is a reply to message #47691] Fri, 24 February 2006 07:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth Bowman writes:

>
> I have to admit, it is cool to interactively drag the image plane (slice) up and
> down.

How do you do that? This option is grayed out for me. :-(

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: How to call an IDL procedure from a DLM
Next Topic: Can I change the iTools splashscreen ??

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

Current Time: Wed Oct 08 13:48:24 PDT 2025

Total time taken to generate the page: 0.00487 seconds