BioGTK  6.3.0
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.OMERO Class Reference
Inheritance diagram for BioGTK.OMERO:

Classes

class  Image
 

Public Member Functions

void InitItems ()
 
void UpdateItems (string filt)
 

Static Public Member Functions

static OMERO Create ()
 
static void StartUpload ()
 
static void UpdateProgress ()
 

Public Attributes

List< Imageimages = new List<Image>()
 

Static Public Attributes

static Progress prog
 
static int IconWidth = 50
 
static int IconHeight = 50
 
static string dataset = ""
 
static long id
 
static List< string > files = new List<string>()
 
static bool uploading = false
 

Protected Member Functions

 OMERO (Builder builder, IntPtr handle)
 

Detailed Description

Definition at line 15 of file OMERO.cs.

Constructor & Destructor Documentation

◆ OMERO()

BioGTK.OMERO.OMERO ( Builder builder,
IntPtr handle )
protected

Definition at line 63 of file OMERO.cs.

63 : base(handle)
64 {
65 _builder = builder;
66 builder.Autoconnect(this);
67 InitItems();
68 this.SizeAllocated += OMERO_SizeAllocated;
69 searchBox.Changed += SearchBox_Changed;
70 comboBox.Changed += ComboBox_Changed;
71 uploadMenu.ButtonPressEvent += UploadMenu_ButtonPressEvent;
72 view.ItemActivated += View_ItemActivated;
73 // Enable drag-and-drop for this window
74 Gtk.Drag.DestSet(this, DestDefaults.All, new TargetEntry[]
75 {
76 new TargetEntry("text/uri-list", TargetFlags.OtherApp, 0)
77 }, Gdk.DragAction.Copy);
78 this.DragDataReceived += View_DragDataReceived;
79 App.ApplyStyles(this);
80 }

Member Function Documentation

◆ Create()

static OMERO BioGTK.OMERO.Create ( )
static

It creates a new Search object, which is a Gtk.Window, and returns it

Returns
A new instance of the Search class.

Definition at line 56 of file OMERO.cs.

57 {
58 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/omero.glade", FileMode.Open));
59 return new OMERO(builder, builder.GetObject("omeroViewer").Handle);
60 }

◆ InitItems()

void BioGTK.OMERO.InitItems ( )

Definition at line 267 of file OMERO.cs.

268 {
269 var comStore = new ListStore(typeof(string));
270 List<DatasetData> dbs = BioLib.OMERO.GetDatasetsData();
271 foreach (var im in dbs)
272 {
273 comStore.AppendValues(im.getName() + " " + im.getId());
274 }
275 comboBox.Model = comStore;
276
277 }

◆ StartUpload()

static void BioGTK.OMERO.StartUpload ( )
static

Definition at line 109 of file OMERO.cs.

110 {
111 foreach (var f in files)
112 {
113 prog = Progress.Create("Uploading", "Uploading image.",f);
114 prog.Show();
115 uploading = true;
116 Thread th = new Thread(UpdateProgress);
117 th.Start();
118 fi = f;
119 Thread ths = new Thread(Upload);
120 ths.Start();
121 }
122 }

◆ UpdateItems()

void BioGTK.OMERO.UpdateItems ( string filt)

Definition at line 278 of file OMERO.cs.

279 {
280 var listStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string));
281 view.PixbufColumn = 0;
282 view.TextColumn = 1;
283 foreach (var im in images)
284 {
285 if(im.name.Contains(filt) || filt == "")
286 listStore.AppendValues(im.pixbuf, im.name);
287 }
288 view.Model = listStore;
289 }

◆ UpdateProgress()

static void BioGTK.OMERO.UpdateProgress ( )
static

Definition at line 130 of file OMERO.cs.

131 {
132 do
133 {
134 OMERO.prog.ProgressValue = BioLib.OMERO.progress;
135 Thread.Sleep(250);
136 } while (OMERO.uploading);
137 OMERO.prog.Hide();
138 }

Member Data Documentation

◆ dataset

string BioGTK.OMERO.dataset = ""
static

Definition at line 47 of file OMERO.cs.

◆ files

List<string> BioGTK.OMERO.files = new List<string>()
static

Definition at line 49 of file OMERO.cs.

◆ IconHeight

int BioGTK.OMERO.IconHeight = 50
static

Definition at line 46 of file OMERO.cs.

◆ IconWidth

int BioGTK.OMERO.IconWidth = 50
static

Definition at line 45 of file OMERO.cs.

◆ id

long BioGTK.OMERO.id
static

Definition at line 48 of file OMERO.cs.

◆ images

List<Image> BioGTK.OMERO.images = new List<Image>()

Definition at line 51 of file OMERO.cs.

◆ prog

Progress BioGTK.OMERO.prog
static

Definition at line 23 of file OMERO.cs.

◆ uploading

bool BioGTK.OMERO.uploading = false
static

Definition at line 50 of file OMERO.cs.


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