Calibration of MASK images . . .
All --
I've noticed something that seems a bit odd.
If IPP904 takes a CALIBRATED ORIGINAL IMAGE (in say 'mm') and a COUNT is done and then a MASK is done, the resulting image inherits the same calibration (in this case mm) as the CALIBRATED ORIGINAL IMAGE.
If IPP904 takes a CALIBRATED ORIGINAL IMAGE (in say 'mm') and the THRESHOLD TOOL (from the SELECT RIBBON) is used to designate a RANGE then a MASK is made from within the THRESHOLD TOOL, the resulting image is UNCALIBRATED (in 'pix').
Is this behavior intentional?
Thanks.
-- Matt
I've noticed something that seems a bit odd.
If IPP904 takes a CALIBRATED ORIGINAL IMAGE (in say 'mm') and a COUNT is done and then a MASK is done, the resulting image inherits the same calibration (in this case mm) as the CALIBRATED ORIGINAL IMAGE.
If IPP904 takes a CALIBRATED ORIGINAL IMAGE (in say 'mm') and the THRESHOLD TOOL (from the SELECT RIBBON) is used to designate a RANGE then a MASK is made from within the THRESHOLD TOOL, the resulting image is UNCALIBRATED (in 'pix').
Is this behavior intentional?
Thanks.
-- Matt
0
Best Answers
-
Matt,This may be a bug, maybe Yuri will have more details. In any case it's not really an automation issue so I am moving it to the Premier General Discussions.Pierre0
-
Yes, it's a bug and will be fixed. For now, if you use a macro, you can just assign spatial calibration of the original image to the mask:mask.SpatialCalibration = image1.SpatialCalibration0
-
Matt, The code looks good. The way you can save a line is to assign the calibration on line 13 ThisApplication.ActiveImage.SpatialCalibration=Image1.SpatialCalibration, unless you need Image2 down in the code. Yuri0
-
The assignment ThisApplication.ActiveImage.SpatialCalibration=Image1.SpatialCalibration will work fine even after the fixing the mask calibration, so you won't have to change anything later.0
Answers
Thank you for your prompt replies.
Pierre --
I'm writing a macro that creates a MASK using the THRESHOLD TOOL before the COUNT gets a chance to do its job so I'll have to have the macro carry the calibration from the ORIGINAL IMAGE to the MASK IMAGE so that I can do a CALIBRATED COUNT.
Yuri --
I worked up a method to do this but it takes about 20 lines of code.
I'll try to implement your suggestion.
-- --
Thanks again.
-- Matt
Here is my successful attempt to implement the advice that you gave me on this topic.
Thank you for pointing me in the right direction.
If there is a more elegant way to do this, please let me know.
Thanks again.
-- Matt
I see what you mean about
ThisApplication.ActiveImage.SpatialCalibration=Image1.SpatialCalibration
eliminating the declaration and initialization of Image2.
Thanks.
-- Matt
A related question . . .
Once the CALIBRATION issue is resolved relative to the way the mask is being made, this step will not be necessary. Would it work to test for this with something like
If (ThisApplication.ActiveImage.SpatialCalibration<>Image1.SpatialCalibration) then
ThisApplication.ActiveImage.SpatialCalibration=Image1.SpatialCalibration
End if
I don't think it will do any harm to carry the calibration across anyway but I'm just trying to learn what you can and can't do within IPP9.
Thanks.
-- Matt