Re: Displaying three images simultaneously (using Object Graphics) [message #46235 is a reply to message #46229] |
Tue, 08 November 2005 02:20   |
Antonio Santiago
Messages: 201 Registered: February 2004
|
Senior Member |
|
|
Victor wrote:
> I have 3 images (im1,im2,im3) which I need to display on XObjView (or
> any alternate object graphics viewer). When I tried to add more than 1
> image to the same graphics object as follows:
>
>> myModel = Obj_New('IDLgrModel')
>> myModel->Add, im1
>> myModel->Add, im2
>
>
> IDL complains:
> "IDLGRMODEL::ADD: Objects can only have one parent at a time:
> <ObjHeapVar9869(IDLGRCOLORBAR)>"
>
> Huh! Okay so to get around this, I created separate objects for the 3
> images, hoping to add the 3 objects onto the same view as follows:
>
>
>> myModel1 = Obj_New('IDLgrModel') & myModel1->Add, im1
>> myModel2 = Obj_New('IDLgrModel') & myModel2->Add, im2
>> myModel3 = Obj_New('IDLgrModel') & myModel3->Add, im3
>
>
> Display these using:
> XOBJVIEW,myModel1,TITLE=myModel1'
> XOBJVIEW,myModel2,TITLE=myModel2 '
> XOBJVIEW,myModel3,TITLE=myModel3 '
>
> These obviously plot the three images into 3 separate XObjView windows.
> I want them to be displayed in the same XObjView window. So I try to
> add them to a container and display the it in XObjView as follows:
> myContainer = OBJ_NEW('IDL_Container')
> myContainer->Add,myModel_1, POSITION=0.1
> myContainer->Add,myModel_2, POSITION=0.5
> myContainer->Add,myModel_3, POSITION=0.9
> XOBJVIEW,myContainer,TITLE='All 3 images'
>
> IDL complains (This time a nastier one):
> "XOBJVIEW: IDLGRMODEL::ADD: The ALIAS keyword is only allowed for
> IDLgrComponent class objects."
>
> Looks like XOBJVIEW doesn't even work with IDL_Container or IDLgrView
> objects either (I tried that)
>
> Also,
>
>> myModel = Obj_New('IDLgrModel')
>> myModel->Add, [myModel_1, myModel_2, myModel_3], POSITION=[10,20,30]*B
>> XOBJVIEW,myModel,TITLE='All 3 images'
>
> Works, but doesn't give the expected results (just overlays the three
> images, Position keyword seems to have no effect whatso ever)
>
Try to use the LOCATION keyword on every IDLgrImage object. It works for
me. Every image has its particular location (and all three overlaped).
> I know the following might be useful, but I am not sure how to
> incorporate them in the above logic (which I'm not even sure is the
> best approach)
> 1) "!P.MULTI"
> 2) "Position"
>
> Sorry for the long post. I seem to be lost and would appreciate any
> insights into this matter. Thanks alot
>
--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
|
|
|