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

Home » Public Forums » archive » Re: Stretching of image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Stretching of image [message #33588 is a reply to message #33586] Wed, 15 January 2003 08:59 Go to previous message
David Burridge is currently offline  David Burridge
Messages: 33
Registered: January 1998
Member
Hi,

Am I getting deja-vu here or what? Wasn't there something *very* similar to
this posted recently? Anyhow...

"New2IDL" <biomedthesis2002@yahoo.com> wrote in message
news:162586e3.0301150823.4d98ab7@posting.google.com...
> Hi.
> i'm trying to generate 3D volume. I use the functions SHADE_VOLUME,
> POLYSHADE etc to display 3D image. I tried the trackball object to
> rotate the 3D object. When i used a cube, sphere or any 3D given
> example from IDL and use trackball on that image, the object rotates
> perfectly. When i try to use my 3D object that was created after
> processing of the data, the image stretches everytime i rotate it in
> different directions. the image i'm using is a 512x512x21. it
> stretches along the z-axis and i have no idea why it streches. Can
> anybody help me with this. Please...
>
> The code i wrote is like this:
>
> #### MAIN CODE ####
> restore, filename = 'headimage1'
> image = bytscl(C1)
> images = image[*,*,*]
> images = images GE 30
> imsize = size(images)
>
> images = congrid(bytscl(images),512,512,512)

I think this is as far as we need to go. If you Congrid the data like this,
you've created 512 samples in the Z direction where there used to be 21.
This is why it stetches. You can either modify the offending Congrid, or
modify the ZCOORD_CONV later on to compress the 256 back into the space
taken up by the 21. I would probably attempt the former, as the size of the
data is less.

Hope this helps,

Dave

--
David Burridge
Burridge Computing, 18 The Green South
Warborough, Oxon, OX10 7DN
England
Tel: +44 (0) 1865 858279, Email: davidb@burridgecomputing.co.uk



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 15/10/2002
[Message index]
 
Read Message
Read Message
Previous Topic: Stretching of image
Next Topic: Looking for a data analysis package - need advise

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

Current Time: Wed Oct 08 19:18:34 PDT 2025

Total time taken to generate the page: 0.00402 seconds