comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Preserving data with ROT
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Preserving data with ROT [message #22866] Wed, 06 December 2000 00:00
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
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
[Message index]
 
Read Message
Previous Topic: IDL and RedHat version 7.0
Next Topic: Thanks Martin

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:51:28 PDT 2025

Total time taken to generate the page: 0.00437 seconds