BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
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 }
RoiEncoder(String path)
Definition: ImageJ.cs:1076

References BioImager.ImageJ.RoiEncoder.write().

◆ 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 }

References BioImager.ImageJ.RoiEncoder.write().

Referenced by BioImager.ImageJ.RoiEncoder.save(), and BioImager.ImageJ.RoiEncoder.write().


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