BioLib  4.1.1
A GUI-less version of Bio .NET library for editing & annotating various microscopy image formats.
Loading...
Searching...
No Matches
BioLib.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]
 

Constructor & Destructor Documentation

◆ Resolution() [1/2]

BioLib.Resolution.Resolution ( int w,
int h,
int omePx,
int bitsPerPixel,
double physX,
double physY,
double physZ,
double stageX,
double stageY,
double stageZ )
297 {
298 x = w;
299 y = h;
300 sx = stageX;
301 sy = stageY;
302 sz = stageZ;
303 format = BioImage.GetPixelFormat(omePx, bitsPerPixel);
304 px = physX;
305 py = physY;
306 pz = physZ;
307 }
Definition Bio.cs:1872

◆ Resolution() [2/2]

BioLib.Resolution.Resolution ( int w,
int h,
PixelFormat f,
double physX,
double physY,
double physZ,
double stageX,
double stageY,
double stageZ )
309 {
310 x = w;
311 y = h;
312 format = f;
313 sx = stageX;
314 sy = stageY;
315 sz = stageZ;
316 px = physX;
317 py = physY;
318 pz = physZ;
319 }

Member Function Documentation

◆ Copy()

Resolution BioLib.Resolution.Copy ( )
321 {
322 return new Resolution(x, y, format, px, py, pz, sx, sy, sz);
323 }
Definition Bio.cs:203

◆ ToString()

override string BioLib.Resolution.ToString ( )
325 {
326 return "new Resolution(" + SizeX + "," + SizeY + "," + format + "," + PhysicalSizeX + "," + PhysicalSizeY + "," + PhysicalSizeZ + "," + StageSizeX + "," + StageSizeY + "," + StageSizeZ + ");";
327 }

Property Documentation

◆ PhysicalSizeX

double BioLib.Resolution.PhysicalSizeX
getset
219 {
220 get { return px; }
221 set { px = value; }
222 }

◆ PhysicalSizeY

double BioLib.Resolution.PhysicalSizeY
getset
224 {
225 get { return py; }
226 set { py = value; }
227 }

◆ PhysicalSizeZ

double BioLib.Resolution.PhysicalSizeZ
getset
229 {
230 get { return pz; }
231 set { pz = value; }
232 }

◆ PixelFormat

PixelFormat BioLib.Resolution.PixelFormat
getset
263 {
264 get { return format; }
265 set { format = value; }
266 }

◆ RGBChannelsCount

int BioLib.Resolution.RGBChannelsCount
get
268 {
269 get
270 {
271 if (PixelFormat == PixelFormat.Format8bppIndexed || PixelFormat == PixelFormat.Format16bppGrayScale)
272 return 1;
273 else if (PixelFormat == PixelFormat.Format24bppRgb || PixelFormat == PixelFormat.Format48bppRgb)
274 return 3;
275 else
276 return 4;
277 }
278 }

◆ SizeInBytes

long BioLib.Resolution.SizeInBytes
get
280 {
281 get
282 {
283 if (format == PixelFormat.Format8bppIndexed)
284 return (long)y * (long)x;
285 else if (format == PixelFormat.Format16bppGrayScale)
286 return (long)y * (long)x * 2;
287 else if (format == PixelFormat.Format24bppRgb)
288 return (long)y * (long)x * 3;
289 else if (format == PixelFormat.Format32bppRgb || format == PixelFormat.Format32bppArgb)
290 return (long)y * (long)x * 4;
291 else if (format == PixelFormat.Format48bppRgb || format == PixelFormat.Format48bppRgb)
292 return (long)y * (long)x * 6;
293 throw new NotSupportedException(format + " is not supported.");
294 }
295 }

◆ SizeX

int BioLib.Resolution.SizeX
getset
209 {
210 get { return x; }
211 set { x = value; }
212 }

◆ SizeY

int BioLib.Resolution.SizeY
getset
214 {
215 get { return y; }
216 set { y = value; }
217 }

◆ StageSizeX

double BioLib.Resolution.StageSizeX
getset
234 {
235 get { return sx; }
236 set { sx = value; }
237 }

◆ StageSizeY

double BioLib.Resolution.StageSizeY
getset
239 {
240 get { return sy; }
241 set { sy = value; }
242 }

◆ StageSizeZ

double BioLib.Resolution.StageSizeZ
getset
244 {
245 get { return sz; }
246 set { sz = value; }
247 }

◆ VolumeHeight

double BioLib.Resolution.VolumeHeight
get
256 {
257 get
258 {
259 return PhysicalSizeY * SizeY;
260 }
261 }

◆ VolumeWidth

double BioLib.Resolution.VolumeWidth
get
249 {
250 get
251 {
252 return PhysicalSizeX * SizeX;
253 }
254 }

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