Re: print Roi?

Posted by Kenneth Sloan-2 on
URL: http://imagej.273.s1.nabble.com/print-Roi-tp5024487p5024489.html

Thank you for the reply.

Answering my own question - I eventually found a demonstration macro, from which I extracted this:

================
Roi.getCoordinates(x,y);
print("ROI coordinates");
for (i=0;i<x.length; i++)
  print(i,x[i],y[i]);
================

I would have preferred a stand-alone (preferably Java) program to read the .roi file and print the coordinates, but for my current purposes it was acceptable to drag&drop the .roi files onto a running FIJI and then run the above  macro.  I only had 10 files to process, so doing this manually was acceptable.

Actually, I was trying to montage several data files, where the raw  data  consisted of:

a) a .csv file giving coordinates for points to be plotted
b) an .roi file giving the location and boundary of the sampled area

Where the points in a) were expressed in local coordinate systems, relative to the top, left corner of the Roi.

Alas, I had no control over the data collection.

I would have preferred to write a stand-along Java program to read a collection of these raw data file pairs, but could not find information on the file format for an .roi file.

Is there  documentation on the format of an .roi file?

--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.





> On Mar 2, 2021, at 22:52, Fred Damen <[hidden email]> wrote:
>
> Greeting Kenneth,
>
> Analyze>Tools>ROI Manager::More>>open...
> ::Properties::List Coordinates then OK
> Note: On a Oval ROI the listed coordinates are an interpolated version of
> the displayed vertices.
> FloatPolygon fp = Roi.getFloatPolygon();
> If you want to read the actual .roi file and list the contents, there are
> MATLAB scripts out there that do this, i.e., easy to read.
>
> ::More>>::List
> This answers one of my previous bonus questions, i.e., GUI display of
> bounding box in voxel/pixel coordinates.
>
> Fred
>
> Produces the definition of the
> On Tue, March 2, 2021 4:04 pm, Kenneth Sloan wrote:
>> I have many (polygon) ROIs stored as .roi files.
>>
>> How can I print the coordinates of the vertices of the ROI?
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>> Vision is the art of seeing what is invisible to others.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html