Login  Register

Re: In a stack, how can I make a different polygon in each slice and 'Save As' their XYZ coordinates?

Posted by imageJnoob on Apr 06, 2014; 5:10pm
URL: http://imagej.273.s1.nabble.com/In-a-stack-how-can-I-make-a-different-polygon-in-each-slice-and-Save-As-their-XYZ-coordinates-tp5007218p5007223.html

Thanks Wayne but I don't think this is what I'm looking for.

I need a tool that allows me to make a polygon dedicated to the slice it is drawn in. Then when I go to the next slice, the first one disappears allowing me to make a new polygon. When all the polygons are drawn, I can return a table where each row is an x y z coordinate, where z is the slice number, like the following:

60.9440 45.4150 1
68.2690 43.9500 1
75.8870 46.8800 1
83.5050 50.6890 1
90.8300 56.5490 2
92.8810 61.5300 2
94.3460 67.3900 2
94.6390 73.5430 2
93.1740 76.4730 2
90.2440 80.5750 2
87.6070 84.3840 2
82.0400 87.9000 3
74.7150 90.8300 3
67.9760 92.0020 3
57.1350 90.8300 3
47.7590 71.7850 3
46.2940 60.3580 3
51.5680 49.8100 3
56.8420 46.5870 3

My goal is to use these coordinates to draw out the same polygons in another program. The row of z-1s trace out a polygon only for the first slice, row of z-2s trace out a polygon for the second slice, and so on.

So far I have to make a polygon, 'save as' xy coordinates, and save the txt file with the slice number in the name. I'm doing this for every slice, which is very tedious. If I have to save each slice as a .TIFF it would be equally as time-consuming, as my stacks are DICOM. Unfortunately my ImageJ doesn't have "List Elements" in Image/Overlay. I did make multiple polygons with the "Add Selection" function but its not slice specific.


Thanks very much for your suggestion Wayne! My offer to pay anyone to code the above function for me still stands!