BioGTK  5.7.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
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]
 

Detailed Description

Definition at line 144 of file QuPath.cs.

Member Function Documentation

◆ FromROI()

static GeoJsonPolygon BioGTK.QuPath.GeoJsonPolygon.FromROI ( ROI roi,
BioImage b )
static

Definition at line 155 of file QuPath.cs.

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

Definition at line 153 of file QuPath.cs.

153{ get; set; }

◆ plane

GeoJsonPlane BioGTK.QuPath.GeoJsonPolygon.plane
getset

Definition at line 154 of file QuPath.cs.

154{ get; set; }

◆ type

string BioGTK.QuPath.GeoJsonPolygon.type
getset

Definition at line 152 of file QuPath.cs.

152{ get; set; }

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