Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hello, The ROT function returns an array that is the same size as the input array. That's fine until the function starts loping off the data I would like to hang onto. As an example, an image of a long skinny cell that sloping across the image from lower left to upper right will be chopped by the ROT function when rotated such that the long axis is horizontal. Here's an example: in = replicate(128B, 50, 50) in[25:*, 25:*] = 255B out = rot(arr,45,missing = 128) tv, in tv, out, 100,0 Currently, I predict the size of the output image that would preserve the data (using an affine transform). Then I make an array of the required size, paste the center of mass of the original array (which in my real data case is the CM of the cell) and then call ROT. It certainly works well, but I have a nagging feeling that I'm doing it the hard way. Everytime I do something using the brute-force-and-ignorance method, I discover there is an easier way to do the job. I have tried using the result of the transform, but it tends to create small gaps and ragged edges for an otherwise 'nice' blob. So, is there a better mousetrap? Thanks for any advice. Ben P.S. ROT calls POLY_2D so perhaps my question should be about that function. -- Ben Tupper Bigelow Laboratory for Ocean Sciences 180 McKown Point Rd. W. Boothbay Harbor, ME 04575 btupper@bigelow.org