Hi,
I'm using IDL 7.0.3 and I'm fairly new to objects.
My basic problem was put a series of spacecraft Field Of View (FOV),
essentially a group of polygons, on a projected map. With direct
graphic it is really simple, but each change requires to completely
draw the windows,so I started playing with iTools.
My problem could be summarized as:
How can I add one of the predefined iTool visualization in an existing
iTool, having all properties in the iTool visualization browser?
I started from basics and tried first to put a IDLgrPolygon
encapsulated in a IDLitVisPolygon on a iPlot
iplot,indgen(10),indgen(10)
X = [4,6,6,4]
Y = [2,2,5,5]
;-- basic IDLgrPolygon
polygon = OBJ_NEW('IDLgrPolygon', X,Y,COLOR=[200,200,200])
;-- IDLitVisualization:Polygon
oPolygon = OBJ_NEW('IDLitVisPolygon', /REGISTER_PROPERTIES)
oPolygon -> IDLitVisPolygon::Add, polygon
;- add the visualization to the current iTool
oSys = _IDLitSys_GetSystem()
oTool = oSys -> _GetCurrentTool()
oTool -> Add, oPolygon, /AGGREGATE
It works in visualizing the polygon, but I cannot modify any property,
like color, and it is visualized always, no matter what data range I'm
currently visualizing in the iPlot window.
The iTool Programming Guide states on pp114 "The IDLitVisualization
class automatically handles selection, selection visuals, data ranges,
and notification of data changes", so I guess I'm messing smt. with
the visualization creation or properties registration.
I tried using a IDLgrROI encapsulated in a IDLitVisROI, but no change.
iplot,indgen(10),indgen(10)
X = [4,6,6,4]
Y = [2,2,5,5]
;-- object graphics ROI > superclass IDLanROI : analysis domain
object
grROI = OBJ_NEW( 'IDLgrROI',X,Y )
;-- ROI visualization object IDLitVisRoi
visoROI = OBJ_NEW('IDLitVisROI', /REGISTER_PROPERTIES)
visoROI -> IDLitVisRoi::Add, grROI, /AGGREGATE
;- add the visualization to the current iTool
oSys = _IDLitSys_GetSystem()
oTool = oSys -> _GetCurrentTool()
oTool -> Add, visoROI, /AGGREGATE
Thanks all,
Mario.
--
Dr. Mario D'Amore
Deutsches Zentrum für Luft- und Raumfahrt
Institut für Planetenforschung
Experimentelle Planetenphysik
Rutherfordstraße 2
12489 Berlin
|