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.Resolution Struct Reference

Public Member Functions

 Resolution (int w, int h, int omePx, int bitsPerPixel, double physX, double physY, double physZ, double stageX, double stageY, double stageZ)
 
 Resolution (int w, int h, PixelFormat f, double physX, double physY, double physZ, double stageX, double stageY, double stageZ)
 
Resolution Copy ()
 
override string ToString ()
 

Public Attributes

int x
 
int y
 
PixelFormat format
 
double px
 
double py
 
double pz
 
double sx
 
double sy
 
double sz
 

Properties

int SizeX [get, set]
 
int SizeY [get, set]
 
double PhysicalSizeX [get, set]
 
double PhysicalSizeY [get, set]
 
double PhysicalSizeZ [get, set]
 
double StageSizeX [get, set]
 
double StageSizeY [get, set]
 
double StageSizeZ [get, set]
 
double VolumeWidth [get]
 
double VolumeHeight [get]
 
PixelFormat PixelFormat [get, set]
 
int RGBChannelsCount [get]
 
long SizeInBytes [get]
 

Detailed Description

Definition at line 164 of file Bio.cs.

Constructor & Destructor Documentation

◆ Resolution() [1/2]

BioImager.Resolution.Resolution ( int  w,
int  h,
int  omePx,
int  bitsPerPixel,
double  physX,
double  physY,
double  physZ,
double  stageX,
double  stageY,
double  stageZ 
)

Definition at line 258 of file Bio.cs.

259 {
260 x = w;
261 y = h;
262 sx = stageX;
263 sy = stageY;
264 sz = stageZ;
265 format = BioImage.GetPixelFormat(omePx, bitsPerPixel);
266 px = physX;
267 py = physY;
268 pz = physZ;
269 }

◆ Resolution() [2/2]

BioImager.Resolution.Resolution ( int  w,
int  h,
PixelFormat  f,
double  physX,
double  physY,
double  physZ,
double  stageX,
double  stageY,
double  stageZ 
)

Definition at line 270 of file Bio.cs.

271 {
272 x = w;
273 y = h;
274 format = f;
275 sx = stageX;
276 sy = stageY;
277 sz = stageZ;
278 px = physX;
279 py = physY;
280 pz = physZ;
281 }

Member Function Documentation

◆ Copy()

Resolution BioImager.Resolution.Copy ( )

Definition at line 282 of file Bio.cs.

283 {
284 return new Resolution(x, y, format, px, py, pz, sx, sy, sz);
285 }

◆ ToString()

override string BioImager.Resolution.ToString ( )

Definition at line 286 of file Bio.cs.

287 {
288 return "(" + x + ", " + y + ") " + format.ToString() + " " + (SizeInBytes / 1000) + " KB";
289 }

Member Data Documentation

◆ format

PixelFormat BioImager.Resolution.format

Definition at line 168 of file Bio.cs.

◆ px

double BioImager.Resolution.px

Definition at line 169 of file Bio.cs.

◆ py

double BioImager.Resolution.py

Definition at line 169 of file Bio.cs.

◆ pz

double BioImager.Resolution.pz

Definition at line 169 of file Bio.cs.

◆ sx

double BioImager.Resolution.sx

Definition at line 169 of file Bio.cs.

◆ sy

double BioImager.Resolution.sy

Definition at line 169 of file Bio.cs.

◆ sz

double BioImager.Resolution.sz

Definition at line 169 of file Bio.cs.

◆ x

int BioImager.Resolution.x

Definition at line 166 of file Bio.cs.

◆ y

int BioImager.Resolution.y

Definition at line 167 of file Bio.cs.

Property Documentation

◆ PhysicalSizeX

double BioImager.Resolution.PhysicalSizeX
getset

Definition at line 180 of file Bio.cs.

181 {
182 get { return px; }
183 set { px = value; }
184 }

◆ PhysicalSizeY

double BioImager.Resolution.PhysicalSizeY
getset

Definition at line 185 of file Bio.cs.

186 {
187 get { return py; }
188 set { py = value; }
189 }

◆ PhysicalSizeZ

double BioImager.Resolution.PhysicalSizeZ
getset

Definition at line 190 of file Bio.cs.

191 {
192 get { return pz; }
193 set { pz = value; }
194 }

◆ PixelFormat

PixelFormat BioImager.Resolution.PixelFormat
getset

Definition at line 224 of file Bio.cs.

225 {
226 get { return format; }
227 set { format = value; }
228 }

◆ RGBChannelsCount

int BioImager.Resolution.RGBChannelsCount
get

Definition at line 229 of file Bio.cs.

230 {
231 get
232 {
233 if (PixelFormat == PixelFormat.Format8bppIndexed || PixelFormat == PixelFormat.Format16bppGrayScale)
234 return 1;
235 else if (PixelFormat == PixelFormat.Format24bppRgb || PixelFormat == PixelFormat.Format48bppRgb)
236 return 3;
237 else
238 return 4;
239 }
240 }

◆ SizeInBytes

long BioImager.Resolution.SizeInBytes
get

Definition at line 241 of file Bio.cs.

242 {
243 get
244 {
245 if (format == PixelFormat.Format8bppIndexed)
246 return (long)y * (long)x;
247 else if (format == PixelFormat.Format16bppGrayScale)
248 return (long)y * (long)x * 2;
249 else if (format == PixelFormat.Format24bppRgb)
250 return (long)y * (long)x * 3;
251 else if (format == PixelFormat.Format32bppRgb || format == PixelFormat.Format32bppArgb)
252 return (long)y * (long)x * 4;
253 else if (format == PixelFormat.Format48bppRgb || format == PixelFormat.Format48bppRgb)
254 return (long)y * (long)x * 6;
255 throw new NotSupportedException(format + " is not supported.");
256 }
257 }

◆ SizeX

int BioImager.Resolution.SizeX
getset

Definition at line 170 of file Bio.cs.

171 {
172 get { return x; }
173 set { x = value; }
174 }

◆ SizeY

int BioImager.Resolution.SizeY
getset

Definition at line 175 of file Bio.cs.

176 {
177 get { return y; }
178 set { y = value; }
179 }

◆ StageSizeX

double BioImager.Resolution.StageSizeX
getset

Definition at line 195 of file Bio.cs.

196 {
197 get { return sx; }
198 set { sx = value; }
199 }

◆ StageSizeY

double BioImager.Resolution.StageSizeY
getset

Definition at line 200 of file Bio.cs.

201 {
202 get { return sy; }
203 set { sy = value; }
204 }

◆ StageSizeZ

double BioImager.Resolution.StageSizeZ
getset

Definition at line 205 of file Bio.cs.

206 {
207 get { return sz; }
208 set { sz = value; }
209 }

◆ VolumeHeight

double BioImager.Resolution.VolumeHeight
get

Definition at line 217 of file Bio.cs.

218 {
219 get
220 {
221 return PhysicalSizeY * SizeY;
222 }
223 }

◆ VolumeWidth

double BioImager.Resolution.VolumeWidth
get

Definition at line 210 of file Bio.cs.

211 {
212 get
213 {
214 return PhysicalSizeX * SizeX;
215 }
216 }

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