comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Image Object Scaling Bug

Image Object Scaling Bug
type: item
description: Image Object Scaling Bug Name: David Fanning E-mail Address: davidf@dfanning.com IDL version: { x86 Win32 Windows 5.0 Apr 28 1997} Platform and OS: WindowsNT 4.0, Service Pack 1 Description of Problem: Quite often in object graphics you want to scale image data into the range of 0 to 1. (For example, you might want to put axes on the image.) Reading the documentation, you might try something like this: s = Size(image) xsize = s(1) ysize = s(2) xs = Norm_Coord([0,xsize]) ys = Norm_Coord([0,ysize]) thisImage = ('IDLgrImage, image, XCoord_Conv=xs, YCoord_Conv=ys) Ignoring the fact that Norm_Coord needs modification (see below) and will return scaling factors of 0 if called like this, this formulation doesn't work. This is because the keywords XCoord_Conv and YCoord_Conv have been implemented incorrectly on the image object. Known Workarounds or Fixes: The workaround is to put the image data into its own model, which is then scaled into the correct range. The code looks like this: s = Size(image) xsize = s(1) ysize = s(2) xs = Norm_Coord([0,xsize]) ys = Norm_Coord([0,ysize]) thisImage = ('IDLgrImage, image) imageModel = ('IDLgrModel') imageModel->Add, thisImage imageModel->Scale, 1.0/xsize, 1.0/ysize, 1 RSI Technical Support Response: Fixed and available in next release. Norm_Coord Program Needs Modification Name: David Fanning E-mail Address: davidf@dfanning.com IDL version: { x86 Win32 Windows 5.0 Apr 28 1997} Platform and OS: WindowsNT 4.0, Service Pack 1 Description of Problem: The Norm_Coord program supplied in the IDL50/examples/objects directory is written so that it requires floating point input values to work correctly. To avoid problems, the code should be rewritten (and renamed so that it works under 8.3 naming conventions) like this: FUNCTION NORMAL, range ; This function takes a range vector [min, max] as contained ; in the [XYZ]RANGE property of an object and converts it to ; a scaling vector (suitable for the [XYZ]COORD_CONV property) ; that scales the ob…
creator: davidf
date: 1997-06-14T07:00:00-00:00