IsoSurface Contour projection [message #16687] |
Mon, 16 August 1999 00:00  |
Waleed Al-Nuaimy
Messages: 12 Registered: July 1999
|
Junior Member |
|
|
Hi. I'm trying to get a 2d contour projection of a 3d IsoSurface
(object), where the contour would represent the largest extent of the
Isosurface along the plane of projection.
I'd be very grateful for any advice.
Thanks
Waleed Al-Nuaimy
Geo-Services International (UK) Ltd.
|
|
|
|
Re: IsoSurface [message #39724 is a reply to message #16687] |
Wed, 09 June 2004 15:42   |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"Aleks" <siliconcube@yahoo.com> wrote in message
news:79140897.0406091344.7121960b@posting.google.com...
> Hi all,
> ok here is the problem I have: I'm trying to run a test on different
> images to figure out how things work. Previously I was helped to find
> the size of my tiff image. I modified the code accordingly.
> Unfortunatelly, when I try to run this code on my images the first
> Window function shows me all my images but when the execution gets to
> the second Window Function I lose IDL ie it crashes. I have 81 nearly
> identical image. (if you would like to see the image you can check it
> out here http://www.geocities.com/siliconcube/tree_01.tif
> images were modified with MatLab). Can anyone help me identify the
> problem, is my image not suitable for Iso Surface or am I doing
> somethign wrong =/.
>
> Thanks
> Aleks
>
>
> files=findfile('*.tif')
> index=bsort(files, sortedfiles)
>
>
> volume=bytarr(761,671,81)
>
> for j=0,80 do begin
> image=read_tiff(sortedfiles[j])
> volume[0,0,j] = image
> endfor
>
> Window, Title='Original Image Slices', XSize=800, YSize=500, 1,
> XPos=0, YPos=0
> LoadCT, 0
> Device, Decomposed=0
> FOR j=0,49 DO TV, volume[*,*,j], j
>
> Window, 6, XSize=800, YSize=800, Title='Test IsoSurface'
> Scale3, XRange=[0,760], YRange=[0,670], ZRange=[0,80], AZ=-150
> Shade_Volume, volume, 81, vertices, polygons, /Low
> theHead = PolyShade(vertices, polygons, /T3D)
> TV, theHead
>
>
>
> end
I ran this on my machine by substituting random data so that the bottom half
of the data (in Y) was < 81 and the top half was > 81 and got a reasonable
looking surface, although I looked at it by making an IDLgrPolygon and using
XOBJVIEW:
XOBJVIEW, OBJ_NEW('IDLgrPolygon', vertices, POLYGONS=polygons)
Did your IDL program stop but IDL was still running? If so, what was the
message?
If IDL itself crashed, it is possible you ran short on memory. Maybe you
could try fewer slices in Shade_Volume or use CONGRID to make smaller
images. Although your data is not that large, it is possible for your
vertex and polygon data to be very large, depending on the contents of the
volume and your isovalue.
Karl
|
|
|
|
Re: IsoSurface [message #39798 is a reply to message #39725] |
Thu, 10 June 2004 10:45  |
siliconcube
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b3136406ab74403989792@news.frii.com>...
> Aleks writes:
>
>> ok here is the problem I have: I'm trying to run a test on different
>> images to figure out how things work. Previously I was helped to find
>> the size of my tiff image. I modified the code accordingly.
>> Unfortunatelly, when I try to run this code on my images the first
>> Window function shows me all my images but when the execution gets to
>> the second Window Function I lose IDL ie it crashes. I have 81 nearly
>> identical image. (if you would like to see the image you can check it
>> out here http://www.geocities.com/siliconcube/tree_01.tif
>> images were modified with MatLab).
>
> Oh, oh. There's your problem. IDL is not going to
> work with anything created in MatLab!!
>
> (No, I'm kidding. It's just a joke.)
>
>> Can anyone help me identify the
>> problem, is my image not suitable for Iso Surface or am I doing
>> somethign wrong =/.
>
> What makes you think you are doing something wrong?
> Did you get an error when you ran this program? Or
> are you just not seeing anything on your display?
>
> Do you have any idea of the range of values in your
> data? (You could print the min and max of your volume.)
> Is 81 a smart choice for the threshold? Where did 81 come
> from? It seems an odd choice. Maybe you could plot a
> histogram of your volume data and find a value that
> makes more sense for the specific data your have.
>
> Cheers,
>
> David
This is the compilation log that I have when I run the program:
IDL Version 6.0, Microsoft Windows (Win32 x86 m32). (c) 2003, Research Systems, Inc.
IDL> .compile test
% Compiled module: $MAIN$.
IDL> .go
% Compiled module: BSORT.
% Loaded DLM: TIFF.
% Compiled module: LOADCT.
% Compiled module: FILEPATH.
% Compiled module: PATH_SEP.
% LOADCT: Loading table B-W LINEAR
% Compiled module: SCALE3.
% Compiled module: T3D.
% POLYSHADE: Expression must be an array in this context: POLYGONS.
% Execution halted at: $MAIN$ 19 C:\RSI\IDL60\test.pro
And this is the code
files=findfile('*.tif')
index=bsort(files, sortedfiles)
volume=bytarr(761,671,81)
for j=0,80 do begin
image=read_tiff(sortedfiles[j])
volume[0,0,j] = image
endfor
;Window, Title='Original Image Slices', XSize=800, YSize=500, 1, XPos=0, YPos=0
LoadCT, 0
Device, Decomposed=0
FOR j=0,80 DO TV, volume[*,*,j], j
Window, 6, XSize=800, YSize=800, Title='Test IsoSurface'
Scale3, XRange=[0,760], YRange=[0,670], ZRange=[0,80], AZ=-150
;Shade_Volume, volume, 81, vertices, polygons, /Low
theHead = PolyShade(vertices, polygons, /T3D)
TV, theHead
end
Thank you
Aleks
|
|
|
Re: IsoSurface [message #39804 is a reply to message #39724] |
Thu, 10 June 2004 08:32  |
siliconcube
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
"Karl Schultz" <kschultz_no_spam@rsinc.com> wrote in message news:<10cf4goodoajr45@corp.supernews.com>...
> "Aleks" <siliconcube@yahoo.com> wrote in message
> news:79140897.0406091344.7121960b@posting.google.com...
>> Hi all,
>> ok here is the problem I have: I'm trying to run a test on different
>> images to figure out how things work. Previously I was helped to find
>> the size of my tiff image. I modified the code accordingly.
>> Unfortunatelly, when I try to run this code on my images the first
>> Window function shows me all my images but when the execution gets to
>> the second Window Function I lose IDL ie it crashes. I have 81 nearly
>> identical image. (if you would like to see the image you can check it
>> out here http://www.geocities.com/siliconcube/tree_01.tif
>> images were modified with MatLab). Can anyone help me identify the
>> problem, is my image not suitable for Iso Surface or am I doing
>> somethign wrong =/.
>>
>> Thanks
>> Aleks
>>
>>
>> files=findfile('*.tif')
>> index=bsort(files, sortedfiles)
>>
>>
>> volume=bytarr(761,671,81)
>>
>> for j=0,80 do begin
>> image=read_tiff(sortedfiles[j])
>> volume[0,0,j] = image
>> endfor
>>
>> Window, Title='Original Image Slices', XSize=800, YSize=500, 1,
>> XPos=0, YPos=0
>> LoadCT, 0
>> Device, Decomposed=0
>> FOR j=0,49 DO TV, volume[*,*,j], j
>>
>> Window, 6, XSize=800, YSize=800, Title='Test IsoSurface'
>> Scale3, XRange=[0,760], YRange=[0,670], ZRange=[0,80], AZ=-150
>> Shade_Volume, volume, 81, vertices, polygons, /Low
>> theHead = PolyShade(vertices, polygons, /T3D)
>> TV, theHead
>>
>>
>>
>> end
>
>
> I ran this on my machine by substituting random data so that the bottom half
> of the data (in Y) was < 81 and the top half was > 81 and got a reasonable
> looking surface, although I looked at it by making an IDLgrPolygon and using
> XOBJVIEW:
>
> XOBJVIEW, OBJ_NEW('IDLgrPolygon', vertices, POLYGONS=polygons)
>
> Did your IDL program stop but IDL was still running? If so, what was the
> message?
>
> If IDL itself crashed, it is possible you ran short on memory. Maybe you
> could try fewer slices in Shade_Volume or use CONGRID to make smaller
> images. Although your data is not that large, it is possible for your
> vertex and polygon data to be very large, depending on the contents of the
> volume and your isovalue.
>
> Karl
Would you mind explaining how do i do the following "substituting
random data so that the bottom half:
> of the data (in Y) was < 81 and the top half was > 81 and got a reasonable
> looking surface, although I looked at it by making an IDLgrPolygon and using
> XOBJVIEW:
>
> XOBJVIEW, OBJ_NEW('IDLgrPolygon', vertices, POLYGONS=polygons)
"
I'm not sure if memory is the problem in my case because my machine
has 5GB of RAM ='(
thank you
Aleks
|
|
|
Re: IsoSurface [message #39805 is a reply to message #39725] |
Thu, 10 June 2004 08:26  |
siliconcube
Messages: 11 Registered: June 2004
|
Junior Member |
|
|
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b3136406ab74403989792@news.frii.com>...
> Aleks writes:
>
>> ok here is the problem I have: I'm trying to run a test on different
>> images to figure out how things work. Previously I was helped to find
>> the size of my tiff image. I modified the code accordingly.
>> Unfortunatelly, when I try to run this code on my images the first
>> Window function shows me all my images but when the execution gets to
>> the second Window Function I lose IDL ie it crashes. I have 81 nearly
>> identical image. (if you would like to see the image you can check it
>> out here http://www.geocities.com/siliconcube/tree_01.tif
>> images were modified with MatLab).
>
> Oh, oh. There's your problem. IDL is not going to
> work with anything created in MatLab!!
>
> (No, I'm kidding. It's just a joke.)
>
>> Can anyone help me identify the
>> problem, is my image not suitable for Iso Surface or am I doing
>> somethign wrong =/.
>
> What makes you think you are doing something wrong?
> Did you get an error when you ran this program? Or
> are you just not seeing anything on your display?
>
> Do you have any idea of the range of values in your
> data? (You could print the min and max of your volume.)
> Is 81 a smart choice for the threshold? Where did 81 come
> from? It seems an odd choice. Maybe you could plot a
> histogram of your volume data and find a value that
> makes more sense for the specific data your have.
>
> Cheers,
>
> David
Previously I used MatLab to combine slices of data and construct 3D
models. My advisor chose to switch to IDL because of its "powerfull"
features. 81 came from the number of slices I have. I'm not really
sure what you mean by range of my values?
|
|
|