Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
dProbela
Level II

Does JMP have any connected-component labeling processing capabilities?

Hi All!

 

Recently, I've become interested in analyzing a large number of images that contain connected regions, similar to what a country map looks like. I'm aware of JMP's "canny" and other edge finding filters, which are very nice tools for finding boundaries. However, in addition to finding boundaries, I'd like to label regions that are enclosed by boundaries, perhaps by color.

 

The simplest example I can give, is producing a color map of the United States; the states are defined by boarders, and then colored differently to show they are distinct. I believe this technique is referred to as connected component labeling, and is sometimes implemented in other processing software. Since I use JMP for the majority of my data processing needs, I'd like to use that rather than bring in new software.

 

Does anyone have any suggestions or leads? Is there a script out there that I've overlooked. Any help would be greatly appreciated! 

 

-dProbela 

 

 

 

 

1 REPLY 1
Highlighted
gzmorgan0
Super User

Re: Does JMP have any connected-component labeling processing capabilities?

@dProbela ,

 

Not sure what you are looking for. Below is a screen shot of the use where state colores are determned by some value of another continuous variable in the data table. Open Graph Builder > drag :State to the Map Shape area, drag Expenditures(1997) to the Color area.

 

The second graph: Open Graph Builder > drag :State to the Map Shape area, drag :State to the Color area. Select (click on) any state in the Legend in the second graph and see it highlighted in the first or in this case Montana data in any other graph.

 

image.png

 

Here is the JSL, the script to create this:

Names Default to Here(1);

dt = Open("$Sample_Data/SATByYear.jmp");

New Window("Concept",
	VlistBox(
		gb1 = Graph Builder(
	Size( 505, 472 ),
	Show Control Panel( 0 ),
	Variables( Color( :Name( "Expenditure (1997)" ) ), Shape( :State ) ),
	Elements( Map Shapes( Legend( 2 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"",
			ScaleBox( 2 ),
			{Min( 16.9162162162162 ), Max( 58.0837837837838 ), Inc( 10 ),
			Minor Ticks( 1 )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				2,
				Properties(
					0,
					{gradient(
						{Color Theme( "White to Green" ),
						Scale Values( [3.5 4.8 6.1 7.4 8.7 10] ),
						Label Format( "Fixed Dec", 15, 0 )}
					)},
					Item ID( "Expenditure (1997)", 1 )
				)
			)}
		)
	)
), //end gb1

gb2 = Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Variables( Color( :State ), Shape( :State ) ),
	Elements( Map Shapes( Legend( 7 ) ) )
)//end gb2
		
	) //end VListBox
);  //end New Window

 

Article Labels