52 #ifndef __PCL_ReadoutOptions_h
53 #define __PCL_ReadoutOptions_h
110 namespace ReadoutMode
166 using readout_data = ReadoutData::value_type;
171 using readout_mode = ReadoutMode::value_type;
176 enum { MaxProbeSize = 15 };
181 enum { MaxPrecision = 15 };
186 enum { MinPreviewSize = 15, MaxPreviewSize = 127 };
191 enum { MaxPreviewZoomFactor = 16 };
276 EnableAlphaChannel( !disable );
304 EnableMaskChannel( !disable );
322 probeSize =
pcl::Range( sz, 1,
int( MaxProbeSize ) ) | 1;
339 previewSize =
pcl::Range( sz,
int( MinPreviewSize ),
int( MaxPreviewSize ) ) | 1;
359 previewZoom =
pcl::Range( zoom, 1,
int( MaxPreviewZoomFactor ) );
376 showPreview = enable;
384 EnablePreview( !disable );
393 return previewCenter;
401 previewCenter = enable;
409 EnablePreviewCenter( !disable );
419 return showEquatorial;
428 showEquatorial = enable;
437 EnableEquatorialCoordinates( !disable );
456 showEcliptic = enable;
465 EnableEclipticCoordinates( !disable );
484 showGalactic = enable;
493 EnableGalacticCoordinates( !disable );
506 return coordinateItems;
519 coordinateItems =
Range( n, 1, 3 );
529 return coordinatePrecision;
541 return Range( coordinatePrecision, 0, 3 + 2*(3 - coordinateItems) );
551 coordinatePrecision =
Range( n, 0, 8 );
579 EnableBroadcast( !disable );
639 precision =
pcl::Range( n, 0,
int( MaxPrecision ) );
691 #ifdef __PCL_BUILDING_PIXINSIGHT_APPLICATION
697 readout_data data = ReadoutData::RGBK;
698 readout_mode mode = ReadoutMode::Mean;
700 int previewSize = 25;
704 bool showAlpha =
true;
705 bool showMask =
true;
706 bool showPreview =
true;
707 bool previewCenter =
true;
708 bool showEquatorial =
true;
709 bool showEcliptic =
false;
710 bool showGalactic =
false;
711 int coordinateItems = 3;
712 int coordinatePrecision = 2;
713 bool broadcast =
true;
A structure to hold global pixel readout options.
readout_data Data() const
bool ShowMaskChannel() const
void EnableEclipticCoordinates(bool enable=true)
bool ShowEclipticCoordinates() const
void SetCoordinatePrecision(int n)
void SetPreviewSize(int sz)
void SetProbeSize(int sz)
int CoordinateItems() const
void EnableEquatorialCoordinates(bool enable=true)
void EnableAlphaChannel(bool enable=true)
bool ShowGalacticCoordinates() const
static void SetCurrentOptions(const ReadoutOptions &)
void SetReal(bool b=true)
void EnableBroadcast(bool enable=true)
void DisablePreviewCenter(bool disable=true)
void EnableMaskChannel(bool enable=true)
void EnableGalacticCoordinates(bool enable=true)
void EnablePreview(bool enable=true)
readout_mode Mode() const
static ReadoutOptions GetCurrentOptions()
int PreviewZoomFactor() const
void DisableEquatorialCoordinates(bool disable=true)
bool ShowPreviewCenter() const
void DisableEclipticCoordinates(bool disable=true)
ReadoutOptions(const ReadoutOptions &)=default
int RealCoordinatePrecision() const
bool ShowEquatorialCoordinates() const
void DisablePreview(bool disable=true)
void DisableMaskChannel(bool disable=true)
bool ShowAlphaChannel() const
void SetCoordinateItems(int n)
unsigned IntegerRange() const
void SetMode(readout_mode m)
void SetInteger(bool b=true)
void DisableAlphaChannel(bool disable=true)
void DisableGalacticCoordinates(bool disable=true)
void SetData(readout_data d)
void EnablePreviewCenter(bool enable=true)
void SetIntegerRange(unsigned n)
bool IsBroadcastEnabled() const
void DisableBroadcast(bool disable=true)
void SetPreviewZoomFactor(int zoom)
int CoordinatePrecision() const
constexpr const T & Range(const T &x, const T &a, const T &b) noexcept