Create smooth, closed-path drawing objects

Maybe this is of use as a user interface for creating shapes for generating ROI masks. Or maybe it's just a fun diversion.

Create a graph window by plotting a wave. Right-click in the graph and select either 'Draw Closed-Path Wave' or 'Draw Closed-Path Shape'. Click to add nodes and control-click (or on mac command-click) to delete nodes. After creating some nodes, click on the first node to complete the closed path. Nodes can be added to a closed path by clicking on the path, and can be re-positioned by dragging. It's not much different to drawing a bezier curve in a drawing layer.

Right-click on a closed-path wave or a drawing object and select 'Edit Nodes' to edit the shape. Right-click on a wave and select 'Convert To Poly' to create a drawing object from a wave.

ClosedPath105.zip (6 KB) ClosedPath106.zip (5.94 KB)

Hi,

 

Started playing with it.  One small usage note: the window must have some axis on it or you get black cells.

so if you just do 

Display

without defining a wave or axis it won't work for you.

Andy

Ah, yes, I should have mentioned that the code is hardwired to left and bottom axes, and that everything works in axis coordinates. The code ought to have a check for the presence of graph axes. It's a bit rough for now.

Edit: now it should be axis-aware.

In version 1.04 I attempted to handle drawing on a plot with log axes correctly.

Foolhardy, no doubt.

I figured that if I draw in log space and transform back to linear, that should do the trick. What could possibly go wrong? Ah, right. Reckless.

Somehow I didn't manage to blow anything up yet in my tests.

I take my hat off to the people who do this for real.

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More