Re: Convert a set of points into an ROI
Posted by Ghislain Bonamy on May 14, 2009; 7:19pm
URL: http://imagej.273.s1.nabble.com/Convert-a-set-of-points-into-an-ROI-tp3692520p3692521.html
Gabriel, Curtis,
I have written the tool to vectorized my shape. For some reason I had some problems implementing Freeman's solution, but since I had came up with a very similar method and that it seemed like it worked I stuck with.
Curtis let me know if I can put this in bioformats.
One quick question. I assume that because I return a polygon, points that lay on the line are not required? For Instance:
10000001
10000001
01111111
00000000
Can be represented as:
X;Y
0;0
0;1
1;2
7;2 <- Here I spiked 2;2 3;2, etc.
7;0 <- Here I skip 7;1
Do you see any major problems with doing this? It would have the advantage of saving some space!
In addition, do you have any advices as to things I should avoid doing wile writing my ROI object?
Finally Does anyone know what the polyline ROI model is? If I use my previous schema:
10000001
10000001
01111111
00000000
Would a polyline representation be:
0;0 -> 7;0
0;1 -> 7;1
1;2 -> 7;2
If this is the case, that might be better to use for objects that have "holes" such as
11111111
10010001
10101001
10010001
01000001
01111111
00000000
Since I can get the object represented bellow, it would be very easy to implement the polyline, (if it is what I suggested above).
11111111
11111111
11101111
11111111
01111111
01111111
00000000
Looking forward to your advices,
Ghislain