BioLib  4.1.1
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)
 

Constructor & Destructor Documentation

◆ RoiEncoder() [1/2]

BioLib.Fiji.RoiEncoder.RoiEncoder ( String path)

Creates an RoiEncoder using the specified path.

1775 {
1776 this.path = path;
1777 }

◆ RoiEncoder() [2/2]

BioLib.Fiji.RoiEncoder.RoiEncoder ( FileStream f)

Creates an RoiEncoder using the specified OutputStream.

1781 {
1782 this.f = f;
1783 }

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.

1787 {
1788 RoiEncoder re = new RoiEncoder(path);
1789 try
1790 {
1791 re.write(b,roi);
1792 }
1793 catch (IOException e)
1794 {
1795 return false;
1796 }
1797 return true;
1798 }
RoiEncoder(String path)
Definition Fiji.cs:1774

◆ write()

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

Save the Roi to the file of stream.

1802 {
1803 if (f != null)
1804 {
1805 write(b,roi);
1806 }
1807 else
1808 {
1809 f = new FileStream(path, FileMode.Create);
1810 write(b,roi, f);
1811 f.Close();
1812 }
1813 }
void write(BioImage b, ROI roi)
Definition Fiji.cs:1801

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