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

Home » Public Forums » archive » IDLgrModel::Scale
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
IDLgrModel::Scale [message #20751] Thu, 20 July 2000 00:00 Go to next message
Mark Guagenti is currently offline  Mark Guagenti
Messages: 14
Registered: May 2000
Junior Member
Hello,
I can't seem to figure out how the IDLgrModel::Scale method works. When I
scale a model that only contains a 2D image by doing the following:

oModel->Scale, 1.2, 1.2, 1

what would the equivalent of doing it with the congrid function? Wouldn't
it be:

imgData = Congrid(imgData, imgsizeX*1.2, imgsizeY*1.2

I guess I really don't understand how the scale method works. Any
enlightenment would be very appreciated.

Thanks,
Mark



-- Mark

Grace and peace to you from God our Father and the Lord Jesus Christ.
1 Cor. 1:3
Re: IDLgrModel::Scale [message #20785 is a reply to message #20751] Wed, 26 July 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Mark Guagenti (guagenti@foodsci.purdue.edu) writes:

> I guess the best way to describe my problem is that I need to be able to scale
> the image data itself, but I also need to scale the other graphic atoms that are
> in a model object. So that's why I was wondering how the IDLgrModel::Scale
> method works because I thought the best approach would to be scale all the atoms
> in the model with the IDLgrModel::Scale and then scale the image data with
> congrid. Where I run into a problem is that if I do oModel->Scale, 1.2, 1.2, 1
> I can't go and do Congrid(imgData, imgsizeX*1.2, imgsizeY*1.2) on the image data
> and get the same proportions. Does any one have an idea that might help?

I think you might be confusing the *visualization* of the data
with the data itself. Congrid, of course, will change the
actual dimensions of the image itself. Scale will effect
how the image (independent of its actual size) will be
viewed in the arbitrary coordinate system established
by the viewplane rectangle.

Although we often think of resizing the image when we
display it in direct graphics, this is completely
unnecessary in object graphics. In the latter system
all the details are done for us simply by the way
we place the image into the viewplane rectangle (and
by the way the viewplane rectangle is mapped into the
destination object).

Here is another case where it is best to forget everything
you ever learned about direct graphics if you are going
to successfully work with object graphics. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDLgrModel::Scale [message #20800 is a reply to message #20751] Tue, 25 July 2000 00:00 Go to previous message
Mark Guagenti is currently offline  Mark Guagenti
Messages: 14
Registered: May 2000
Junior Member
Hello All,
I guess the best way to describe my problem is that I need to be able to scale
the image data itself, but I also need to scale the other graphic atoms that are
in a model object. So that's why I was wondering how the IDLgrModel::Scale
method works because I thought the best approach would to be scale all the atoms
in the model with the IDLgrModel::Scale and then scale the image data with
congrid. Where I run into a problem is that if I do oModel->Scale, 1.2, 1.2, 1
I can't go and do Congrid(imgData, imgsizeX*1.2, imgsizeY*1.2) on the image data
and get the same proportions. Does any one have an idea that might help?

Thanks in advance,
Mark

Rick Towler wrote:

> Hi Mark,
>
> There will undoubtedly be a far better answer to your post but I might
> be able to get you thinking.
>
>> I can't seem to figure out how the IDLgrModel::Scale method works. When I
>> scale a model that only contains a 2D image by doing the following:
>>
>> oModel->Scale, 1.2, 1.2, 1
>
> You seem to be using it correctly. :)
>
> The difference is that in object graphics your scaling doesn't actually
> change the objects data. Your second approach (using congrid)operates
> on the image data itself and "scaling" the image smaller will result in
> lost data.
>
> -Rick
>
> Mark Guagenti wrote:
>>
>> Hello,
>> I can't seem to figure out how the IDLgrModel::Scale method works. When I
>> scale a model that only contains a 2D image by doing the following:
>>
>> oModel->Scale, 1.2, 1.2, 1
>>
>> what would the equivalent of doing it with the congrid function? Wouldn't
>> it be:
>>
>> imgData = Congrid(imgData, imgsizeX*1.2, imgsizeY*1.2
>>
>> I guess I really don't understand how the scale method works. Any
>> enlightenment would be very appreciated.
>>
>> Thanks,
>> Mark
>>
>> -- Mark
>>
>> Grace and peace to you from God our Father and the Lord Jesus Christ.
>> 1 Cor. 1:3
Re: IDLgrModel::Scale [message #20825 is a reply to message #20751] Mon, 24 July 2000 00:00 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Hi Mark,

There will undoubtedly be a far better answer to your post but I might
be able to get you thinking.

> I can't seem to figure out how the IDLgrModel::Scale method works. When I
> scale a model that only contains a 2D image by doing the following:
>
> oModel->Scale, 1.2, 1.2, 1

You seem to be using it correctly. :)

The difference is that in object graphics your scaling doesn't actually
change the objects data. Your second approach (using congrid)operates
on the image data itself and "scaling" the image smaller will result in
lost data.

-Rick


Mark Guagenti wrote:
>
> Hello,
> I can't seem to figure out how the IDLgrModel::Scale method works. When I
> scale a model that only contains a 2D image by doing the following:
>
> oModel->Scale, 1.2, 1.2, 1
>
> what would the equivalent of doing it with the congrid function? Wouldn't
> it be:
>
> imgData = Congrid(imgData, imgsizeX*1.2, imgsizeY*1.2
>
> I guess I really don't understand how the scale method works. Any
> enlightenment would be very appreciated.
>
> Thanks,
> Mark
>
> -- Mark
>
> Grace and peace to you from God our Father and the Lord Jesus Christ.
> 1 Cor. 1:3
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDLgrPolyline
Next Topic: Re: help with future application

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

Current Time: Fri Oct 10 13:46:11 PDT 2025

Total time taken to generate the page: 1.20146 seconds