BioGTK  6.0.0
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images. Including whole slide, pyramidal, and series.
All Classes Namespaces Functions
BioGTK.StackTools Class Reference
Inheritance diagram for BioGTK.StackTools:

Public Member Functions

void UpdateStacks ()
 It takes a list of images and adds them to a dropdown menu.
 

Static Public Member Functions

static StackTools Create ()
 Default Shared Constructor.
 

Protected Member Functions

 StackTools (Builder builder, IntPtr handle)
 Specialised constructor for use only by derived class.
 

Properties

BioImage ImageA [get]
 
BioImage ImageB [get]
 

Detailed Description

Definition at line 7 of file StackTools.cs.

Constructor & Destructor Documentation

◆ StackTools()

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

Specialised constructor for use only by derived class.

Parameters
builderThe builder.
handleThe handle.

Definition at line 57 of file StackTools.cs.

57 : base(handle)
58 {
59 _builder = builder;
60 builder.Autoconnect(this);
61 // Create an Adjustment object to define the range and step increment
62 zStartBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
63 cStartBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
64 tStartBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
65 zEndBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
66 cEndBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
67 tEndBox.Adjustment = new Adjustment(0, 0, 10000, 1, 10, 0);
68
69 stackABox.Changed += StackABox_Changed;
70 stackBBox.Changed += StackBBox_Changed;
71 splitChannelsBut.Clicked += SplitChannelsBut_Clicked;
72 substackBut.Clicked += SubstackBut_Clicked;
73 mergeZBut.Clicked += MergeZBut_Clicked;
74 mergeTBut.Clicked += MergeTBut_Clicked;
75 mergeBut.Clicked += MergeBut_Clicked;
76 this.FocusInEvent += StackTools_FocusInEvent;
77 // Set the text column to display
78 var renderer = new CellRendererText();
79 stackABox.PackStart(renderer, false);
80 stackABox.AddAttribute(renderer, "text", 0);
81 // Set the text column to display
82 var renderer2 = new CellRendererText();
83 stackBBox.PackStart(renderer2, false);
84 stackBBox.AddAttribute(renderer2, "text", 0);
85 App.ApplyStyles(this);
86 }

Member Function Documentation

◆ Create()

static StackTools BioGTK.StackTools.Create ( )
static

Default Shared Constructor.

Returns
StackTools

Definition at line 48 of file StackTools.cs.

49 {
50 Builder builder = new Builder(new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) + "/" + "Glade/Stacks.glade", FileMode.Open));
51 return new StackTools(builder, builder.GetObject("stackTools").Handle);
52 }
StackTools(Builder builder, IntPtr handle)
Specialised constructor for use only by derived class.
Definition StackTools.cs:57

◆ UpdateStacks()

void BioGTK.StackTools.UpdateStacks ( )

It takes a list of images and adds them to a dropdown menu.

Definition at line 244 of file StackTools.cs.

245 {
246 var imgs = new ListStore(typeof(string));
247 // Add items to the ListStore
248 foreach (BioImage b in Images.images)
249 {
250 imgs.AppendValues(b.Filename);
251 }
252 // Set the model for the ComboBox
253 stackABox.Model = imgs;
254 stackBBox.Model = imgs;
255 zEndBox.Adjustment.Upper = ImageA.SizeZ;
256 cEndBox.Adjustment.Upper = ImageA.SizeC;
257 tEndBox.Adjustment.Upper = ImageA.SizeT;
258 }

Property Documentation

◆ ImageA

BioImage BioGTK.StackTools.ImageA
get

Definition at line 259 of file StackTools.cs.

260 {
261 get
262 {
263 if (stackABox.Active != -1)
264 return Images.images[stackABox.Active];
265 else
266 return Images.images[0];
267 }
268 }

◆ ImageB

BioImage BioGTK.StackTools.ImageB
get

Definition at line 269 of file StackTools.cs.

270 {
271 get
272 {
273 if (stackBBox.Active != -1)
274 return Images.images[stackBBox.Active];
275 else
276 return Images.images[0];
277 }
278 }

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