BioGTK  5.4.1
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.Fiji.RoiEncoder Class Reference

Public Member Functions

 RoiEncoder (String path)
 
 RoiEncoder (FileStream f)
 
void write (ROI roi)
 

Static Public Member Functions

static bool save (ROI roi, String path)
 

Detailed Description

Definition at line 1141 of file Fiji.cs.

Constructor & Destructor Documentation

◆ RoiEncoder() [1/2]

BioGTK.Fiji.RoiEncoder.RoiEncoder ( String path)

Creates an RoiEncoder using the specified path.

Definition at line 1160 of file Fiji.cs.

1161 {
1162 this.path = path;
1163 }

◆ RoiEncoder() [2/2]

BioGTK.Fiji.RoiEncoder.RoiEncoder ( FileStream f)

Creates an RoiEncoder using the specified OutputStream.

Definition at line 1166 of file Fiji.cs.

1167 {
1168 this.f = f;
1169 }

Member Function Documentation

◆ save()

static bool BioGTK.Fiji.RoiEncoder.save ( ROI roi,
String path )
static

Saves the specified ROI as a file, returning 'true' if successful.

Definition at line 1172 of file Fiji.cs.

1173 {
1174 RoiEncoder re = new RoiEncoder(path);
1175 try
1176 {
1177 re.write(roi);
1178 }
1179 catch (IOException e)
1180 {
1181 return false;
1182 }
1183 return true;
1184 }
RoiEncoder(String path)
Definition Fiji.cs:1160

◆ write()

void BioGTK.Fiji.RoiEncoder.write ( ROI roi)

Save the Roi to the file of stream.

Definition at line 1187 of file Fiji.cs.

1188 {
1189 if (f != null)
1190 {
1191 write(roi, f);
1192 }
1193 else
1194 {
1195 f = new FileStream(path,FileMode.Create);
1196 write(roi, f);
1197 f.Close();
1198 }
1199 }
void write(ROI roi)
Definition Fiji.cs:1187

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