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

Home » Public Forums » archive » Re: adding subset image into larger one
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: adding subset image into larger one [message #70170 is a reply to message #70169] Tue, 23 March 2010 17:53 Go to previous messageGo to previous message
Suguru Amakubo is currently offline  Suguru Amakubo
Messages: 24
Registered: March 2010
Junior Member
Unfortunately if I do that the function of the line (I think) will
change.

I intend the line to add the subset on top of the bigger image in a
while loop and the definition of the temp_image is done on the
previous line.

The original code was like:

a=0
b=-1

;while loop that runs through the array and places blocks on top of
the image
while a LT n_elements(mc_point[0,*]) do begin

;extracting the block from the original image
temp_image = new_image2[mc_point[0,b+1]:mc_point[0,b
+1]+L-1,mc_point[1,a]:mc_point[1,a]+L-1]

;adding the subset to a 400x400 image
new_image = new_image[tr_point[0,a]:tr_point[0,a]
+L-1,tr_point[1,a]:tr_point[1,a]+L-1] + temp_image

;adding an 30x30 array of 1s to a blank 400x400 image
population
population = population[tr_point[0,a]:tr_point[0,a]
+L,tr_point[1,a]:tr_point[1,a]+L] + coverage_image

a=a+1
b=b+1

endwhile

So the temp_image (a 30x30 array) was added to new_image(400x400) and
ditto with population and coverage_image

I am under the impression that

new_image[tr_point[0,a]:tr_point[0,a] $
+L-1,tr_point[1,a]:tr_point[1,a]+L-1] += temp_image

will define the portion of new_image as temp_image (please tell me if
I am making a critical mistake) :)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Calculating the Exponential using IDL
Next Topic: Detecting whether a user-defined System Variable is in use

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

Current Time: Wed Oct 08 15:49:48 PDT 2025

Total time taken to generate the page: 0.00378 seconds