Hi -
I only realise now that getADDE() has been depreciated (since when?). I have noted one important difference: loadADDE does not return the metadata meta data ny more, but only the image data (which is fine by me). Are there other differences I should know about? I assume I better upgrade my many sripts accordingly.
cheers, HP
getADDE() -> loadADDE()
Re: getADDE() -> loadADDE()
Hi HP,
getADDEImage will still work, but future development will only apply to loadADDEImage. loadADDEImage returns the metadata within the data object. loadADDEImage works similar to getADDEImage, except one object containing metadata is returned rather than a data object and metadata. The official change occurred in McV 1.5.
Joleen
getADDEImage will still work, but future development will only apply to loadADDEImage. loadADDEImage returns the metadata within the data object. loadADDEImage works similar to getADDEImage, except one object containing metadata is returned rather than a data object and metadata. The official change occurred in McV 1.5.
Code: Select all
b2=loadADDEImage(**parms)
print b2['nominal-time']
panel=buildWindow()
myIRLayer=panel[0].createLayer('Image Display', b2)
Joleen
Re: getADDE() -> loadADDE()
Hi HP -
It looks like Joleen beat me to this, but here's a bit more information. The transition from getADDEImage to loadADDEImage occurred with the release of version 1.5. There are a couple reasons for this change:
You are correct that getADDEImage returned two objects and loadADDEImage only returns one object. getADDEImage returned one metadata object, and one object containing both the data and metadata (that we are referring to as a mega object). loadADDEImage now only returns this mega object. You can use the mega object in the same way you could the metadata object from getADDEImage. For example, you can pull the image size from the mega object returned from loadADDEImage to use for the dimensions of a window (as demonstrated in this script):
While your scripts using getADDEImage should continue to work, we recommend updating to loadADDEImage since any future development will occur there.
Thanks -
Bob Carp
It looks like Joleen beat me to this, but here's a bit more information. The transition from getADDEImage to loadADDEImage occurred with the release of version 1.5. There are a couple reasons for this change:
- Naming consistency with other functions like loadGrid and the future loadVIIRSImage functions
- The other functions in 1 above only return one object. So for consistency, loadADDEImage only returns one object
You are correct that getADDEImage returned two objects and loadADDEImage only returns one object. getADDEImage returned one metadata object, and one object containing both the data and metadata (that we are referring to as a mega object). loadADDEImage now only returns this mega object. You can use the mega object in the same way you could the metadata object from getADDEImage. For example, you can pull the image size from the mega object returned from loadADDEImage to use for the dimensions of a window (as demonstrated in this script):
Code: Select all
myDict = dict(
server = 'adde.ssec.wisc.edu',
dataset = 'RTIMAGES',
descriptor = 'GE-IR',
size = (800,1300),
)
data = loadADDEImage(**myDict)
# get window size from data
bwHeight = data['lines']
bwWidth = data['elements']
print 'Building window with height of '+str(bwHeight)+' pixels and width of '+str(bwWidth)+' pixels.'
panel = buildWindow(height=bwHeight, width=bwWidth)
layer = panel[0].createLayer('Image Display',data)
While your scripts using getADDEImage should continue to work, we recommend updating to loadADDEImage since any future development will occur there.
Thanks -
Bob Carp