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

Home » Public Forums » archive » zoom at widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: zoom at widgets [message #92359 is a reply to message #92358] Sat, 28 November 2015 15:37 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Saturday, November 28, 2015 at 6:30:04 PM UTC, skymaxwell wrote:
> i did some changes. It's works
>
> IF ((*pState).imageLoaded NE 0) THEN BEGIN
> data=*(*pState).pImage
> zoom_data=data[x-4:x+4,y-4:y+4]
> help,zoom_data
> WIDGET_CONTROL,(*pState).draw,GET_VALUE=id
> WSET,id
> zoom_data=REBIN(zoom_data,360,360,/SAMPLE)
> WIDGET_CONTROL,(*pstate).zoom,GET_VALUE=id
> WSET,id
> TVSCL,zoom_data
> ENDIF
> ENDIF
>
> but zoomed images still not like original. Zoomed image pixels are changing own intensivity. Why ?

Hi,
the intensities you display are adapted (rescaled) between 0 and 255 using the tvscl command. In other words, what tvscl does is this:
tv, bytscl(zoom_data)

If you want the scaling to be the same in the two images, you have to find out what scaling you have in the first image and apply this to the zoomed image.
See http://www.exelisvis.com/docs/BYTSCL.html for more information.

If you don't use any scaling in the fist image (that means you simply use tvscl), then you can substitute your tvscl command in the zoom data display with this:
mn=min(data, max=mx)
tv, bytscl(zoom_data, max=mx, min=mn)

I hope it helps.

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem discovered in bandpass_filter.pro
Next Topic: ROI of 3D volumes (multiple 2D slices)

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

Current Time: Sat Oct 11 16:27:04 PDT 2025

Total time taken to generate the page: 0.15979 seconds