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

Home » Public Forums » archive » DISP_ROI_GROW_REGION
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
DISP_ROI_GROW_REGION [message #59447] Wed, 26 March 2008 08:31 Go to previous message
Leonardo R. Sbaraini is currently offline  Leonardo R. Sbaraini
Messages: 26
Registered: October 2007
Junior Member
Hello all,

Example of the problem:

I need to resize a ROI (oversample) obtained from image1 (100x100)
and show it in image2 (200x200).
I had success in creating a tool to downsample the ROI (the inverse
problem), but do oversample, the ROI is not exactly what I want, have
somr borders problem.

Well, seeing the file "envi_all_functions.txt" that I dont know from
where it cames, theres is method with a sintaxe:

DISP_ROI_GROW_REGION, p_data, /ASK, /GROUP, /REDO

I ask if someone had used this routine, and dont know how to initiate
p_data.

Maybe I can help showing my code here (to oversample):

; ***************************
; Growing for x axis
; ***************************
; x is a long array with the xaxis positions

xSize = n_elements(x)

xNewSize = xSize * intScaleFactor * intScaleFactor

xNew = lonarr(xNewSize)

xNew[*] = -1

currentXnewIndex = 0

for xi=0, xSize-1 do begin

numberToWrite = x[xi]

; The box side for every x
for sfRepeater = 0, intScaleFactor-1 do begin

; The box side for current element of x (xi)
for sfRepeaterNested = 0, intScaleFactor-1 do begin

; Verifying the image limit
if numberToWrite lt lngDestinationWidth then begin

xNew[currentXnewIndex++] =
numberToWrite

endif

endfor

numberToWrite++

endfor

endfor

; Removing invalid indexes
goodIndex = where(xNew ne -1)
if goodIndex[0] ne -1 then xNew = xNew[goodIndex]

x = temporary(xNew)


;
************************************************************ ***********************
[Message index]
 
Read Message
Read Message
Previous Topic: IDL 7.0 Java connector
Next Topic: Re: how to create a new folder by IDL

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

Current Time: Sat Oct 11 01:18:53 PDT 2025

Total time taken to generate the page: 1.83970 seconds