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 #70174 is a reply to message #70173] Tue, 23 March 2010 17:08 Go to previous messageGo to previous message
Suguru Amakubo is currently offline  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
[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: Fri Oct 10 08:16:54 PDT 2025

Total time taken to generate the page: 1.27914 seconds