Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
See how to move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.
flood = Function({},
Try(:"neighbors_dir+diag"n<< get name(), Caption("can you tell me the direct and diagonal neighbors ?!?"); stop());
dt = current data table();
nr = n rows(dt = dt);
Try(:wall; dt << delete column(:wall));
new column("wall", Nominal, set each value(1));
:wall[1]=2;
dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Color( :wall ) ),
Elements( Points( X, Y, Legend( 4 ) ) )
);
wait(1);
dt << begin data update();
// mark additional pixels as wall "2" if the neighboring pixel belongs to wall 2 - swipe from top to bottom, then inverse - and so on ...
for( i = 1, i<16, i++ ,
dt << begin data update();
for each ({rw}, 1::nr,
if(rw>1,
:wall[rw] = max(:wall[:"neighbors_dir+diag"n[rw]])));
for each ({rw}, reverse(1::nr),
if(rw>1,
:wall[rw] = max(:wall[:"neighbors_dir+diag"n[rw]])));
dt << end data update();
wait(0.1);
);
)