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.DGraphics Class Reference

Public Member Functions

bool Initialize (DSystemConfiguration configuration, IntPtr windowHandle, BioImage im)
 
void ShutDown ()
 
bool Frame (IntRange r, IntRange g, IntRange b, float interval, float alpha)
 

Properties

DDX11 D3D [get, set]
 
DCamera Camera [get, set]
 
DModel Model [get, set]
 
DTimer Timer [get, set]
 
int BitsPerPixel [get, set]
 

Detailed Description

Definition at line 5 of file DGraphics.cs.

Constructor & Destructor Documentation

◆ DGraphics()

BioImager.DGraphics.DGraphics ( )

Definition at line 15 of file DGraphics.cs.

15{ }

Member Function Documentation

◆ Frame()

bool BioImager.DGraphics.Frame ( IntRange  r,
IntRange  g,
IntRange  b,
float  interval,
float  alpha 
)

Definition at line 80 of file DGraphics.cs.

81 {
82 // Render the graphics scene.
83 return Render(r, g, b, interval, alpha);
84 }

◆ Initialize()

bool BioImager.DGraphics.Initialize ( DSystemConfiguration  configuration,
IntPtr  windowHandle,
BioImage  im 
)

Definition at line 18 of file DGraphics.cs.

19 {
20 try
21 {
22 // Create the Direct3D object.
23 D3D = new DDX11();
24
25 // I nitialize the Direct3D object.
26 if (!D3D.Initialize(configuration, windowHandle))
27 return false;
28
29 // Create the camera object
30 Camera = new DCamera();
31
32 // Set the initial position of the camera.
33 Camera.SetPosition(0.1f, -0.1f, -1);
34
35 // Create the model object.
36 Model = new DModel();
37
38 // Initialize the model object.
39 if (!Model.Initialize(D3D.Device, im))
40 return false;
41
42 // Create the color shader object.
43 ColorShader = new DColorShader();
44
45 // Initialize the color shader object.
46 if (!ColorShader.Initialize(D3D.Device, windowHandle, im.bitsPerPixel))
47 return false;
48
49 // Create the Timer
50 Timer = new DTimer();
51
52 // Initialize the Timer
53 if (!Timer.Initialize())
54 return false;
55 BitsPerPixel = im.bitsPerPixel;
56 return true;
57 }
58 catch (Exception ex)
59 {
60 MessageBox.Show("Could not initialize Direct3D\nError is '" + ex.Message + "'");
61 return false;
62 }
63 }

◆ ShutDown()

void BioImager.DGraphics.ShutDown ( )

Definition at line 64 of file DGraphics.cs.

65 {
66 // Release the camera object.
67 Camera = null;
68 Timer = null;
69
70 // Release the color shader object.
71 ColorShader?.ShutDown();
72 ColorShader = null;
73 // Release the model object.
74 Model?.ShutDown();
75 Model = null;
76 // Release the Direct3D object.
77 D3D?.ShutDown();
78 D3D = null;
79 }

Property Documentation

◆ BitsPerPixel

int BioImager.DGraphics.BitsPerPixel
getset

Definition at line 13 of file DGraphics.cs.

13{ get; set; }

◆ Camera

DCamera BioImager.DGraphics.Camera
getset

Definition at line 9 of file DGraphics.cs.

9{ get; set; }

◆ D3D

DDX11 BioImager.DGraphics.D3D
getset

Definition at line 8 of file DGraphics.cs.

8{ get; set; }

◆ Model

DModel BioImager.DGraphics.Model
getset

Definition at line 10 of file DGraphics.cs.

10{ get; set; }

◆ Timer

DTimer BioImager.DGraphics.Timer
getset

Definition at line 12 of file DGraphics.cs.

12{ get; set; }

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