CImCombine:GetErrorMsg


The GetErrorMsg method returns the error message when combining fails. Failure occurs when any combining method, such as Mean, SigmaClip, ContraMean, etc., returns a nil value in place of the new image. If a nil value is returned, the script can call the present method to get information about what went wrong.

Syntax

string = CImCombine:GetErrorMsg()

bullet.gif    the error is returned as string. If no error occurred, the value is "Success".

Example

Suppose a CImageSet named S exists. The following script attempts to combine the image set using the Mean method, but the method fails because one of the images has a different dimension than the others:

C = new_imcombine()

-- create a CImCombine object

R = new_rect(10,50,10,50)

-- central 10% of the image

C:SetRelRect( R )

-- specify CImage and CRect to measure

C:SetNormStat("median")

-- use the median as the normalization statistic

C:SetNormMethod("scale")

-- scale to normalize the image set

I = C:Mean( S )

-- combine the image set and return a new image

if I == nil then

 

  Exit( C:GetErrorMsg() )

-- show the error message and abort

end

 

I:Display()

-- show the new image

C:delete()

-- when done with S, remove it from memory

Related Topics

CImCombine


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.