There is an undocumented routine you can use to do this, but as always with undocumented routines, they are 'use at your own risk', meaning they could change in a new version of ENVI and we cannot guarantee backwards compatibility. But its a pretty straight-forward routine, so it should be fairly 'safe'.
So once you display your image, get the display number with:
ENVI> dn=envi_get_display_numbers()
Then call the annotation widget with the annotation file (this example hides the widget itself):
ENVI> ann_init, dn, ann_file = 'bh.ann', /hide_window
|