BioLib  3.6.2
A GUI-less version of Bio .NET library for editing & annotating various microscopy image formats.
Loading...
Searching...
No Matches
BioLib.Fiji.RoiEncoder Class Reference

Public Member Functions

 RoiEncoder (String path)
 
 RoiEncoder (FileStream f)
 
void write (BioImage b, ROI roi)
 

Static Public Member Functions

static bool save (BioImage b, ROI roi, String path)
 

Detailed Description

Definition at line 1404 of file Fiji.cs.

Constructor & Destructor Documentation

◆ RoiEncoder() [1/2]

BioLib.Fiji.RoiEncoder.RoiEncoder ( String path)

Creates an RoiEncoder using the specified path.

Definition at line 1423 of file Fiji.cs.

1424 {
1425 this.path = path;
1426 }

◆ RoiEncoder() [2/2]

BioLib.Fiji.RoiEncoder.RoiEncoder ( FileStream f)

Creates an RoiEncoder using the specified OutputStream.

Definition at line 1429 of file Fiji.cs.

1430 {
1431 this.f = f;
1432 }

Member Function Documentation

◆ save()

static bool BioLib.Fiji.RoiEncoder.save ( BioImage b,
ROI roi,
String path )
static

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

Definition at line 1435 of file Fiji.cs.

1436 {
1437 RoiEncoder re = new RoiEncoder(path);
1438 try
1439 {
1440 re.write(b,roi);
1441 }
1442 catch (IOException e)
1443 {
1444 return false;
1445 }
1446 return true;
1447 }
RoiEncoder(String path)
Definition Fiji.cs:1423

◆ write()

void BioLib.Fiji.RoiEncoder.write ( BioImage b,
ROI roi )

Save the Roi to the file of stream.

Definition at line 1450 of file Fiji.cs.

1451 {
1452 if (f != null)
1453 {
1454 write(b,roi);
1455 }
1456 else
1457 {
1458 f = new FileStream(path, FileMode.Create);
1459 write(b,roi, f);
1460 f.Close();
1461 }
1462 }
void write(BioImage b, ROI roi)
Definition Fiji.cs:1450

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