Re: adding subset image into larger one [message #70174 is a reply to message #70173] |
Tue, 23 March 2010 17:08   |
Suguru Amakubo
Messages: 24 Registered: March 2010
|
Junior Member |
|
|
Thank you all for the reply.
yes this seems like a compilation error, I get the output below when I
compile it:
IDL> .COMPILE "C:\Users\kaizo\physics\block_shift.pro"
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
^
Syntax error.
At: C:\Users\kaizo\physics\block_shift.pro, Line 58
population = population[tr_point[0,a]:tr_point[0,a]
+L,tr_point[1,a]:tr_point[1,a]+L] += coverage_image
^
Syntax error.
At: C:\Users\kaizo\physics\block_shift.pro, Line 61
2 Compilation error(s) in module BLOCK_SHIFT.
and here are the while loop that contains them (I do get runtime error
running the below but that I now know how to resolve it and will be
done soon) :
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
Again thank you very much for your help. :)
Suguru
|
|
|