Re: List of Points --> ROI via IDLVECTOR data type for iimage itool [message #45807] |
Fri, 14 October 2005 10:40  |
David Alexander
Messages: 26 Registered: August 2005
|
Junior Member |
|
|
Edward,
OK, I see what you're trying to do.
There's no point visualization that I know of in iTools. However, you
could create a second image containing only the points, and overlay it
on top of the original. This is based on the same idea as my last
example. I'm setting the points to red in the overlay image, and making
all other pixels transparent.
pro test
x = bytscl(randomu(s,1000))
y = bytscl(randomu(s,1000))
newImage=bytarr(256,256)
newImage[x,y]=255
newImage=[[[newImage]],[[bytarr(256,256)]],[[bytarr(256,256) ]],[[newImage]]]
iimage,dist(256)
iimage,newImage,/OVERPLOT
end
If you don't want to mark individual pixels, but would rather put some
kind of symbol annotation in the location of each point, you could
overlay a 2D plot with symbols on the image, then turn off the plot
line. Something like this:
pro test
x = bytscl(randomu(s,100))
y = bytscl(randomu(s,100))
idx=SORT(x)
x=x[idx]
y=y[idx]
iimage,dist(256)
iplot,x,y,/OVERPLOT,LINESTYLE=6,SYM_INDEX=2
;Remove the axes
void=itGetCurrent(TOOL=oTool)
id=oTool->FindIdentifiers('*plot',/VISUALIZATIONS)
oPlot=oTool->GetByIdentifier(id)
oPlot->SetAxesStyleRequest,0
;Unselect the plot to force the axes to disappear
oPlot->Select,0
end
iPlot will always add axes, so the last few lines of my example show
how to turn those off. iplot also has many other keywords to set the
appearance (color, size, type, etc.) of the symbols.
Dave
|
|
|