How can a PREMIER PROJECT access the MARKER DISTANCES within the LINE PROFILE TOOL?
All --
I have a project that needs to use the LINE PROFILE TOOL.
I have created a routine (SAA_CaliperTool -- please see below) that activates the appropriate PREMIER FEATURES to create the LINE PROFILE LINE and the LINE PROFILE MARKERS.
Unfortunately there are two problems. They are:
1) I cannot determine how to access the data within the LINE PROFILE TOOL
2) I cannot determine how to DELETE a LINE PROFILE MARKER.
I have looked in the AUTOMATION HELP to solve #1 and the closest I come is:
MediaCy.Automation.Measure.LineProfile Namespace
I have looked in the PREMIER HELP to solve #2 and the closes I come is:
mk:@MSITStore:C:\PROGRA~1\MEDIAC~1\IMAGE-~1.1\Help\IMAGE-~2.CHM::/Line_Profile_Edges.htm
Can someone please point me the right direction?
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
I have a project that needs to use the LINE PROFILE TOOL.
I have created a routine (SAA_CaliperTool -- please see below) that activates the appropriate PREMIER FEATURES to create the LINE PROFILE LINE and the LINE PROFILE MARKERS.
Unfortunately there are two problems. They are:
1) I cannot determine how to access the data within the LINE PROFILE TOOL
2) I cannot determine how to DELETE a LINE PROFILE MARKER.
I have looked in the AUTOMATION HELP to solve #1 and the closest I come is:
MediaCy.Automation.Measure.LineProfile Namespace
Automation
Reference ► MediaCy.Automation.Measure.LineProfile
I have looked in the PREMIER HELP to solve #2 and the closes I come is:
mk:@MSITStore:C:\PROGRA~1\MEDIAC~1\IMAGE-~1.1\Help\IMAGE-~2.CHM::/Line_Profile_Edges.htm
Can someone please point me the right direction?
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Public Function SAA_CaliperTool() 'Activate the LINE PROFILE FEATURE With Measure.LineProfileCommands.LineProfile(Nothing) .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked .Run() End With 'Remove any preexisting LINE PROFILES from the image With Measure.LineProfile.ProfileCommands.RemoveAll(Nothing) .Run(ThisApplication.ActiveDocument) End With '-- Create the XY COORDINATES for the LINE PROFILE LINE Dim MyX1, MyY1 As Double MyX1 = ThisApplication.ActiveImage.Width / 2. MyY1 = ThisApplication.ActiveImage.Height / 2. Dim MyX2, MyY2 As Double MyX2 = ThisApplication.ActiveImage.Width / 2. MyY2 = ThisApplication.ActiveImage.Height * 0. 'Create a LINE PROFILE LINE With Measure.LineProfile.ProfileCommands.Add(Nothing) .CreateEngine = True .ProfileType = LineProfile.ProfileTypes.Line .Points = New System.Collections.Generic.List(Of System.Drawing.PointF) .Points.Add(New System.Drawing.PointF(MyX1,MyY1)) .Points.Add(New System.Drawing.PointF(MyX2,MyY2)) .Angle = 0R .Run(ThisApplication.ActiveDocument) End With 'Activate the MANUAL EDGE EDITING TOOL in the INTERACTIVE MODE with PROMPT With measure.LineProfile.ToolsCommands.Select(Nothing) .Tool = LineProfile.mcOverlayTool.mcotManualPatternA .Interactive = True .Prompt = "Please place LINE PROFILE MARKERS in the appropriate locations and then press OK." .Run(ThisApplication.ActiveDocument) End With 'Deactivate all tools by selecting the NO TOOL With Measure.Measurements.ToolsCommands.Select(Nothing) .tool = eMMTool.NoTool .Run(ThisApplication.ActiveDocument) End With 'AAA? 'Connect with the LINE PROFILE MEASUREMENT DATA 'BBB? 'Learn the LINE PROFILE MARKER COUNT 'CCC? 'Learn the LINE PROFILE MARKER DISTANCES ' 'Deactivate LINE PROFILE FEATURE ' With Measure.LineProfileCommands.LineProfile(Nothing) ' .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Unchecked ' .Run() ' End With End Function
0
Best Answer
-
Matt, please, select correct tool and auto detection method (the macro coded for Peaks):
Nikita.
0
Answers
Search forum for McLineProfileEngine, basically you need access to Line Profile Engine, this line:
Dim lpe As LineProfile.McLineProfileEngine = LineProfile.AddIn.LineProfileEngine(doc1,True)
Thanks,
Nikita.
Thank you for your guidance.
I have done the FORUM SEARCH that you recommended and I have looked at the code in your POST (on the face and within gx2pqitnsdlr.ipx.
I can get to the DISTANCES generated by the PEAK DETECTION with
using in the code below.
Unfortunately I cannot seem to get to the DISTANCES generated by MANUAL EDGE EDITING.
Also, what is the procedure from the PREMIER USER INTERFACE to SELECT and DELETE a MANUAL EDGE?
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Hold "Shift" then manual Peak tool is selected to remove.
Thanks,
Nikita.
Thank you for the additional information.
D doesn't generate anything for me when there are only MANUAL PEAKS. Can you please try it that way? Also, I'm using 9.1.4.
I created
with a couple of other DEBUG.PRINTS and when I run
it seems to skip the MANUAL PEAKS. This is shown in the SCREEN CAPTURE below.
I was able to DELETE MANUAL PEAKS with the SHIFT + MANUAL EDGE EDITING.
I don't see this information in the HELP FILE.
Thanks for your assistance.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Works for me on 9.1.4 fine even with just the manual peaks.
On your screenshot, the distances have many significant digits - they are manual peaks!
Nikita.
I'm sorry to be such a headache but something is working differently on my PREMIER 9.1.4 and yours.
I created a LINE PROFILE with 5 MANUAL EDGES and then ran Convert_Peaks_To_Measurements2. The routine did not see any EDGES.
I made the LINE PROFILE identify several AUTOMATIC EDGE and then ran Convert_Peaks_To_Measurements2. The routine did not see any EDGES.
I created a 2nd LINE PROFILE with several AUTOMATIC EDGES and several MANUAL EDGES and then ran Convert_Peaks_To_Measurements2. The routine did not see any EDGES.
SCREEN CAPTURES are attached.
Thank you for your assistance.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
Single LINE PROFILE with only MANUAL EDGES
Single LINE PROFILE with MANUAL EDGES and AUTO EDGES
Double LINE PROFILE (one toward TOP of IMAGE, one toward BOTTOM of IMAGE) with MANUAL and AUTO EDGES
Thank you for pointing that out to me.
I have made the following change to the CODE:
When I search the AUTOMATION HELP FILES, I don't see any helpful information when I search for
but in
EdgeTypes Enumeration
I see
Peaks
Valleys
Rising
Falling
PatternA
PatternB
Reference
so I took a shot at using
Here is a SCREEN CAPTURE to show this.
The revised version of Convert_Peaks_To_Measurements2 is below.
Thanks.
-- Matt
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-