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.
sMsg = CImCombine:GetErrorMsg() where |
sMsg is the error message. If no error occurred, the value is "Success".
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:
|
-- create a CImCombine object |
|
-- central 10% of the image |
|
-- specify CImage and CRect to measure |
|
-- use the median as the normalization statistic |
|
-- scale to normalize the image set |
|
-- combine the image set and return a new image |
|
|
|
-- show the error message and abort |
|
|
|
-- show the new image |