BioGTK  5.1.1
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images.
Loading...
Searching...
No Matches
BioGTK.QuPath.GeoJsonPolygon Class Reference

Classes

class  GeoJsonPlane
 

Static Public Member Functions

static GeoJsonPolygon FromROI (ROI roi, BioImage b)
 

Properties

string type [get, set]
 
double[][][] coordinates [get, set]
 
GeoJsonPlane plane [get, set]
 

Member Function Documentation

◆ FromROI()

static GeoJsonPolygon BioGTK.QuPath.GeoJsonPolygon.FromROI ( ROI  roi,
BioImage  b 
)
inlinestatic
156 {
157 int pc = roi.PointsD.Count;
158 if (roi.PointsD.Last() != roi.PointsD.First())
159 pc = roi.PointsD.Count + 1;
160 GeoJsonPolygon g = new GeoJsonPolygon();
161 double[][][] dds = new double[1][][];
162 double[][] ds = new double[pc][];
163 for (int i = 0; i < pc; i++)
164 {
165 if (i >= roi.PointsD.Count)
166 {
167 PointD po = b.ToImageSpace(roi.PointsD[0]);
168 ds[i] = new double[2] { (int)po.X, (int)po.Y };
169 }
170 else
171 {
172 PointD po = b.ToImageSpace(roi.PointsD[i]);
173 ds[i] = new double[2] { (int)po.X, (int)po.Y };
174 }
175 }
176
177 dds[0] = ds;
178 g.coordinates = dds;
179 g.type = "Polygon";
180 g.plane = new GeoJsonPlane();
181 g.plane.z = roi.coord.Z;
182 g.plane.c = roi.coord.C;
183 g.plane.t = roi.coord.T;
184 return g;
185 }

Property Documentation

◆ coordinates

double [][][] BioGTK.QuPath.GeoJsonPolygon.coordinates
getset
153{ get; set; }

◆ plane

GeoJsonPlane BioGTK.QuPath.GeoJsonPolygon.plane
getset
154{ get; set; }

◆ type

string BioGTK.QuPath.GeoJsonPolygon.type
getset
152{ get; set; }

The documentation for this class was generated from the following file: