BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
BioImager.ImageJ.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 1057 of file ImageJ.cs.

Constructor & Destructor Documentation

◆ RoiEncoder() [1/2]

BioImager.ImageJ.RoiEncoder.RoiEncoder ( String path)

Creates an RoiEncoder using the specified path.

Definition at line 1076 of file ImageJ.cs.

1077 {
1078 this.path = path;
1079 }

◆ RoiEncoder() [2/2]

BioImager.ImageJ.RoiEncoder.RoiEncoder ( FileStream f)

Creates an RoiEncoder using the specified OutputStream.

Definition at line 1082 of file ImageJ.cs.

1083 {
1084 this.f = f;
1085 }

Member Function Documentation

◆ save()

static bool BioImager.ImageJ.RoiEncoder.save ( ROI roi,
String path )
static

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

Definition at line 1088 of file ImageJ.cs.

1089 {
1090 RoiEncoder re = new RoiEncoder(path);
1091 try
1092 {
1093 re.write(roi);
1094 }
1095 catch (IOException e)
1096 {
1097 return false;
1098 }
1099 return true;
1100 }

◆ write()

void BioImager.ImageJ.RoiEncoder.write ( ROI roi)

Save the Roi to the file of stream.

Definition at line 1103 of file ImageJ.cs.

1104 {
1105 if (f != null)
1106 {
1107 write(roi, f);
1108
1109 }
1110 else
1111 {
1112 f = new FileStream(path, FileMode.Create);
1113 write(roi, f);
1114 f.Close();
1115 }
1116 }

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