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
-
Pierre and Yuri --
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
0 -
Yuri --
Here is my successful attempt to implement the advice that you gave me on this topic.'Call the routine that will select the original image Call SelectOriginalImage 'Learn the information about the current image Dim Image1 = ThisApplication.ActiveImage 'Call the appropriate routine based on the checkboxes in the SETTINGS for MAKE MASK IMAGE If (radiobutton1.Checked = True) Then Call MaskBright If (radiobutton2.Checked = True) Then Call MaskDark If (radiobutton3.Checked = True) Then Call MaskManual 'Learn the information about the current image Dim Image2 = ThisApplication.ActiveImage 'Transfer the calibration information from the original image into the mask image Image2.SpatialCalibration = Image1.SpatialCalibration
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
0 -
Yuri --
I see what you mean about
ThisApplication.ActiveImage.SpatialCalibration=Image1.SpatialCalibration
eliminating the declaration and initialization of Image2.
Thanks.
-- Matt
0 -
Yuri --
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
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions