mgalloy wrote:
> nata wrote:
>> On May 26, 2:30 pm, mgalloy <mgal...@gmail.com> wrote:
>>> nata wrote:
>>>> Hi people,
>>>> I've 2 IDLgrImages into an IDLgrModel and I want to rotate the images
>>>> 30 degrees.
>>>> I tried to use the IDLgrModel::Rotate method and I did not succeed
>>>> with the rotation.
>>>> I tried a lot of combinations:
>>>> model->rotate, [0,0,0], 30
>>>> model->rotate, [1,0,0], 30
>>>> etc..
>>>> Why the images don't rotate? grgrgggrrrr ....
>>>> How to do that ?
>>>> Thanks in advance,
>>>> nata
>>> Set the TRANSFORM_MODE property of the IDLgrImage to 1 (assuming you
>>> have IDL 6.2+).
>>>
>>
>> No results,
>>
>> I try with the TRANSFORM_MODE KEYWORD set to 1 and nothing happens.
>>
>> topo=OBJ_NEW('IDLgrImage',DIMENSIONS=image_sz
>> [1:2],DATA=image.image,LOCATION=[0,0],/TRANSFORM_MODE)
>> model=OBJ_NEW('IDLgrModel')
>> model->Add, topo
>> ;--------------------------
>> model->Rotate, [0,0,0], 120l
>> ;--------------------------
>> view->Add, model
>> scene->Add, view
>> ...
>>
>> What am i doing wrong?
>
> Rotate about a non-zero vector i.e. model->rotate, [0, 0, 1], 120.0
>
> Mike
Here's a simple example (try changing TRANSFORM_MODE to 0 to see the odd
results):
ali = read_image(file_which('people.jpg'))
view = obj_new('IDLgrView')
model = obj_new('IDLgrModel')
view->add, model
image = obj_new('IDLgrImage', ali, transform_mode=1)
model->add, image
model->rotate, [0, 0, 1], 30.0
xc = [-1., 2. / 255.]
image->setProperty, xcoord_conv=xc, ycoord_conv=xc
win = obj_new('IDLgrWindow', dimensions=[256, 256])
win->draw, view
Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
|