I need a one button solution for calirating up loaded files from another source.
I load a lot of 1,000x images from SEM (FEI) that come to Premier as uncalibrated. That's expected with proprietary tags. But I'd like to select all the up loaded images and apply a calibration without having to do each one individually. Or have a function like global that applies a calibration to all images that are opened.
0
Best Answer
-
Another solution would be to assign System calibration to every loaded image automatically. System calibration is selected in the Characteristics group (be sure that Spatial Calibration combobox is visible in the Characteristics group).
Just load the attached project and all newly loaded images will get calibrated.
Yuri0
Answers
This macro calibrates all open images:
Public Function Calibrate_All_Open_Images() As SimpleScript Calibrate_All_Open_Images = New SimpleScript Dim var1 = "CALIBRATION_NAME", spcal1 With Measure.Calibration.SpatialCommands.Define(Calibrate_All_Open_Images) .Run(var1, spcal1) End With With Automate.ScriptingCommands.CodeCommand(Calibrate_All_Open_Images) If .Run() Then ' User Code Here If spcal1 IsNot Nothing Then For Each doc As IMcDocument In .Application.Documents.Values With Measure.Calibration.SpatialCommands.Apply(Calibrate_All_Open_Images) .Run(doc, spcal1) End With Next End If End If End With End Function All you need just to change the calibration name in the code. Thanks, Nikita.
And one more note: Spatial Calibration combo can be added to the Characteristics ribbon activating Spatial Calibration checkbox on the Applicaton page of the Application Options dialog (File | Options).
Yuri