BioGTK  5.1.1
A .NET library & program for annotating, editing various microscopy imaging formats using Bioformats supported images.
Loading...
Searching...
No Matches
BioGTK.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]

BioGTK.Resolution.Resolution ( int  w,
int  h,
int  omePx,
int  bitsPerPixel,
double  physX,
double  physY,
double  physZ,
double  stageX,
double  stageY,
double  stageZ 
)
inline
275 {
276 x = w;
277 y = h;
278 sx = stageX;
279 sy = stageY;
280 sz = stageZ;
281 format = BioImage.GetPixelFormat(omePx, bitsPerPixel);
282 px = physX;
283 py = physY;
284 pz = physZ;
285 }
double px
Definition Bio.cs:185
double sz
Definition Bio.cs:185
int x
Definition Bio.cs:182
double pz
Definition Bio.cs:185
double py
Definition Bio.cs:185
PixelFormat format
Definition Bio.cs:184
int y
Definition Bio.cs:183
double sy
Definition Bio.cs:185
double sx
Definition Bio.cs:185

◆ Resolution() [2/2]

BioGTK.Resolution.Resolution ( int  w,
int  h,
PixelFormat  f,
double  physX,
double  physY,
double  physZ,
double  stageX,
double  stageY,
double  stageZ 
)
inline
287 {
288 x = w;
289 y = h;
290 format = f;
291 sx = stageX;
292 sy = stageY;
293 sz = stageZ;
294 px = physX;
295 py = physY;
296 pz = physZ;
297 }

Member Function Documentation

◆ Copy()

Resolution BioGTK.Resolution.Copy ( )
inline
299 {
300 return new Resolution(x, y, format, px, py, pz, sx, sy, sz);
301 }
Resolution(int w, int h, int omePx, int bitsPerPixel, double physX, double physY, double physZ, double stageX, double stageY, double stageZ)
Definition Bio.cs:274

◆ ToString()

override string BioGTK.Resolution.ToString ( )
inline
303 {
304 return "(" + x + ", " + y + ") " + format.ToString() + " " + (SizeInBytes / 1000) + " KB";
305 }
long SizeInBytes
Definition Bio.cs:258

Member Data Documentation

◆ format

PixelFormat BioGTK.Resolution.format

◆ px

double BioGTK.Resolution.px

◆ py

double BioGTK.Resolution.py

◆ pz

double BioGTK.Resolution.pz

◆ sx

double BioGTK.Resolution.sx

◆ sy

double BioGTK.Resolution.sy

◆ sz

double BioGTK.Resolution.sz

◆ x

int BioGTK.Resolution.x

◆ y

int BioGTK.Resolution.y

Property Documentation

◆ PhysicalSizeX

double BioGTK.Resolution.PhysicalSizeX
getset
197 {
198 get { return px; }
199 set { px = value; }
200 }

◆ PhysicalSizeY

double BioGTK.Resolution.PhysicalSizeY
getset
202 {
203 get { return py; }
204 set { py = value; }
205 }

◆ PhysicalSizeZ

double BioGTK.Resolution.PhysicalSizeZ
getset
207 {
208 get { return pz; }
209 set { pz = value; }
210 }

◆ PixelFormat

PixelFormat BioGTK.Resolution.PixelFormat
getset
241 {
242 get { return format; }
243 set { format = value; }
244 }

◆ RGBChannelsCount

int BioGTK.Resolution.RGBChannelsCount
get
246 {
247 get
248 {
249 if (PixelFormat == PixelFormat.Format8bppIndexed || PixelFormat == PixelFormat.Format16bppGrayScale)
250 return 1;
251 else if (PixelFormat == PixelFormat.Format24bppRgb || PixelFormat == PixelFormat.Format48bppRgb)
252 return 3;
253 else
254 return 4;
255 }
256 }
PixelFormat PixelFormat
Definition Bio.cs:241

◆ SizeInBytes

long BioGTK.Resolution.SizeInBytes
get
258 {
259 get
260 {
261 if (format == PixelFormat.Format8bppIndexed)
262 return (long)y * (long)x;
263 else if (format == PixelFormat.Format16bppGrayScale)
264 return (long)y * (long)x * 2;
265 else if (format == PixelFormat.Format24bppRgb)
266 return (long)y * (long)x * 3;
267 else if (format == PixelFormat.Format32bppRgb || format == PixelFormat.Format32bppArgb)
268 return (long)y * (long)x * 4;
269 else if (format == PixelFormat.Format48bppRgb || format == PixelFormat.Format48bppRgb)
270 return (long)y * (long)x * 6;
271 throw new NotSupportedException(format + " is not supported.");
272 }
273 }

◆ SizeX

int BioGTK.Resolution.SizeX
getset
187 {
188 get { return x; }
189 set { x = value; }
190 }

◆ SizeY

int BioGTK.Resolution.SizeY
getset
192 {
193 get { return y; }
194 set { y = value; }
195 }

◆ StageSizeX

double BioGTK.Resolution.StageSizeX
getset
212 {
213 get { return sx; }
214 set { sx = value; }
215 }

◆ StageSizeY

double BioGTK.Resolution.StageSizeY
getset
217 {
218 get { return sy; }
219 set { sy = value; }
220 }

◆ StageSizeZ

double BioGTK.Resolution.StageSizeZ
getset
222 {
223 get { return sz; }
224 set { sz = value; }
225 }

◆ VolumeHeight

double BioGTK.Resolution.VolumeHeight
get
234 {
235 get
236 {
237 return PhysicalSizeY * SizeY;
238 }
239 }
double PhysicalSizeY
Definition Bio.cs:202
int SizeY
Definition Bio.cs:192

◆ VolumeWidth

double BioGTK.Resolution.VolumeWidth
get
227 {
228 get
229 {
230 return PhysicalSizeX * SizeX;
231 }
232 }
double PhysicalSizeX
Definition Bio.cs:197
int SizeX
Definition Bio.cs:187

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