PCL
pcl::ImageView Class Reference

Client-side interface to a PixInsight ImageView control. More...

#include <ImageView.h>

+ Inheritance diagram for pcl::ImageView:

Public Types

using background_brush = BackgroundBrush::value_type
 
using display_channel = DisplayChannel::value_type
 
using gui_mode = ImageMode::value_type
 
using scroll_event_handler = void(Control::*)(ImageView &sender, int dx, int dy)
 
using transparency_mode = TransparencyMode::value_type
 
- Public Types inherited from pcl::ScrollBox
using pos_event_handler = void(Control::*)(ScrollBox &sender, int pos)
 
using range_event_handler = void(Control::*)(ScrollBox &sender, int minValue, int maxValue)
 
- Public Types inherited from pcl::Frame
using style = FrameStyle::value_type
 
- Public Types inherited from pcl::Control
using child_event_handler = void(Control::*)(Control &sender, Control &child)
 
using close_event_handler = void(Control::*)(Control &sender, bool &allowClose)
 
using event_handler = void(Control::*)(Control &sender)
 
using file_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers, bool &wantsFiles)
 
using file_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const StringList &files, unsigned modifiers)
 
using keyboard_event_handler = void(Control::*)(Control &sender, int key, unsigned modifiers, bool &wantsKey)
 
using mouse_button_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int button, unsigned buttons, unsigned modifiers)
 
using mouse_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, unsigned buttons, unsigned modifiers)
 
using mouse_wheel_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, int delta, unsigned buttons, unsigned modifiers)
 
using move_event_handler = void(Control::*)(Control &sender, const pcl::Point &newPos, const pcl::Point &oldPos)
 
using paint_event_handler = void(Control::*)(Control &sender, const pcl::Rect &updateRect)
 
using resize_event_handler = void(Control::*)(Control &sender, int newWidth, int newHeight, int oldWidth, int oldHeight)
 
using view_drag_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers, bool &wantsView)
 
using view_drop_event_handler = void(Control::*)(Control &sender, const pcl::Point &pos, const View &view, unsigned modifiers)
 

Public Member Functions

 ImageView (Control &parent=Control::Null(), int width=0, int height=0, int numberOfChannels=1, int bitsPerSample=32, bool floatSample=true, bool color=false)
 
 ~ImageView () override
 
void BeginSelection (const Point &p, uint32 flags=0)
 
void BeginSelection (int x, int y, uint32 flags=0)
 
void CancelSelection ()
 
void CommitPendingUpdates ()
 
int CurrentAlphaChannel () const
 
display_channel CurrentChannel () const
 
gui_mode CurrentMode () const
 
void DeleteICCProfile ()
 
void DisableColorManagement (bool disable=true)
 
void DisableGamutCheck (bool disable=true)
 
void DisableProofing (bool disable=true)
 
void EnableColorManagement (bool=true)
 
void EnableGamutCheck (bool=true)
 
void EnableProofing (bool=true)
 
void EndSelection ()
 
bool GetICCProfile (ICCProfile &icc) const
 
void GetImageGeometry (int &width, int &height, int &numberOfChannels) const
 
void GetRGBWS (RGBColorSystem &rgbws) const
 
void GetSampleFormat (int &bitsPerSample, bool &floatSample) const
 
void GetViewportSize (int &width, int &height) const
 
Point GlobalToViewport (const Point &p) const
 
Rect GlobalToViewport (const Rect &r) const
 
void GlobalToViewport (int &x, int &y) const
 
bool HasPendingUpdates () const
 
void HideTransparency ()
 
ImageVariant Image () const
 
Rect ImageBounds () const
 
int ImageHeight () const
 
void ImageScalarToViewport (double *d, size_type n) const
 
double ImageScalarToViewport (double) const
 
void ImageScalarToViewport (int *d, size_type n) const
 
int ImageScalarToViewport (int) const
 
template<typename T >
void ImageToViewport (Array< GenericPoint< T > > &a) const
 
template<typename T >
GenericPoint< T > ImageToViewport (const GenericPoint< T > &p) const
 
template<typename T >
GenericRectangle< T > ImageToViewport (const GenericRectangle< T > &r) const
 
void ImageToViewport (double &x, double &y) const
 
void ImageToViewport (DPoint *p, size_type n) const
 
void ImageToViewport (int &x, int &y) const
 
void ImageToViewport (Point *p, size_type n) const
 
int ImageWidth () const
 
bool IsAlphaChannelDisplayed () const
 
bool IsColorImage () const
 
bool IsColorManagementEnabled () const
 
bool IsGamutCheckEnabled () const
 
bool IsProofingEnabled () const
 
bool IsSelection () const
 
bool IsTransparencyVisible () const
 
void ModifySelection (const Point &p, uint32 flags=0)
 
void ModifySelection (int x, int y, uint32 flags=0)
 
void OnScrollViewport (scroll_event_handler handler, Control &receiver)
 
void Regenerate ()
 
void RegenerateImageRect (const pcl::DRect &r)
 
void RegenerateImageRect (double x0, double y0, double x1, double y1)
 
void RegenerateViewportRect (const Rect &r)
 
void RegenerateViewportRect (int x0, int y0, int x1, int y1)
 
void Reset ()
 
void SelectChannel (display_channel channel)
 
Rect SelectionRect (uint32 *flags=0) const
 
void SelectMode (gui_mode mode)
 
void SetColorManagementFeatures (bool cmEnabled, bool proofing, bool gamutCheck)
 
void SetICCProfile (const ICCProfile &icc)
 
void SetICCProfile (const String &filePath)
 
void SetRGBWS (const RGBColorSystem &rgbws)
 
void SetSampleFormat (int bitsPerSample, bool floatSample)
 
void SetTransparencyMode (transparency_mode mode, RGBA color=0)
 
void SetViewport (const DPoint &center, int zoom=0)
 
void SetViewport (double cx, double cy, int zoom=0)
 
void SetViewportPosition (const Point &p)
 
void SetViewportPosition (int x, int y)
 
void SetZoomFactor (int z)
 
RGBA TransparencyColor () const
 
transparency_mode TransparencyMode () const
 
void UpdateImageRect (const pcl::DRect &r)
 
void UpdateImageRect (double x0, double y0, double x1, double y1)
 
void UpdateSelection ()
 
void UpdateViewport ()
 
void UpdateViewportRect (const Rect &r)
 
void UpdateViewportRect (int x0, int y0, int x1, int y1)
 
Bitmap ViewportBitmap (const Rect &r, uint32 flags=0) const
 
Bitmap ViewportBitmap (int x0, int y0, int x1, int y1, uint32 flags=0) const
 
int ViewportHeight () const
 
Point ViewportPosition () const
 
void ViewportScalarToImage (double *d, size_type n) const
 
double ViewportScalarToImage (double d) const
 
void ViewportScalarToImage (int *d, size_type n) const
 
template<typename T >
double ViewportScalarToImage (T d) const
 
Point ViewportToGlobal (const Point &p) const
 
Rect ViewportToGlobal (const Rect &r) const
 
void ViewportToGlobal (int &x, int &y) const
 
template<typename T >
void ViewportToImage (Array< GenericPoint< T > > &a) const
 
template<typename T >
DPoint ViewportToImage (const GenericPoint< T > &p) const
 
template<typename T >
DRect ViewportToImage (const GenericRectangle< T > &r) const
 
void ViewportToImage (double &x, double &y) const
 
void ViewportToImage (DPoint *p, size_type n) const
 
void ViewportToImage (int &x, int &y) const
 
void ViewportToImage (Point *p, size_type n) const
 
Rect ViewportUpdateRect () const
 
int ViewportWidth () const
 
int VisibleViewportHeight () const
 
Rect VisibleViewportRect () const
 
int VisibleViewportWidth () const
 
int ZoomFactor () const
 
void ZoomIn ()
 
void ZoomOut ()
 
- Public Member Functions inherited from pcl::ScrollBox
 ScrollBox (Control &parent=Control::Null())
 
 ~ScrollBox () override
 
void DisableAutoScroll (bool disableHorz=true, bool disableVert=true)
 
void DisableHorizontalTracking (bool disableHorz=true)
 
void DisableTracking (bool disableHorz=true, bool disableVert=true)
 
void DisableVerticalTracking (bool disableVert=true)
 
void EnableAutoScroll (bool enableHorz=true, bool enableVert=true)
 
void EnableHorizontalTracking (bool enableHorz=true)
 
void EnableTracking (bool enableHorz=true, bool enableVert=true)
 
void EnableVerticalTracking (bool enableVert=true)
 
void GetHorizontalScrollRange (int &minPos, int &maxPos) const
 
void GetVerticalScrollRange (int &minPos, int &maxPos) const
 
void HideHorizontalScrollBar (bool hide=true)
 
void HideScrollBars (bool hideHorz=true, bool hideVert=true)
 
void HideVerticalScrollBar (bool hide=true)
 
int HorizontalScrollPosition () const
 
bool IsHorizontalAutoScrollEnabled () const
 
bool IsHorizontalScrollBarVisible () const
 
bool IsHorizontalTrackingEnabled () const
 
bool IsVerticalAutoScrollEnabled () const
 
bool IsVerticalScrollBarVisible () const
 
bool IsVerticalTrackingEnabled () const
 
int LineHeight () const
 
int LineWidth () const
 
int MaxHorizontalScrollPosition () const
 
int MaxVerticalScrollPosition () const
 
int MinHorizontalScrollPosition () const
 
int MinVerticalScrollPosition () const
 
void OnHorizontalScrollPosUpdated (pos_event_handler handler, Control &receiver)
 
void OnHorizontalScrollRangeUpdated (range_event_handler handler, Control &receiver)
 
void OnVerticalScrollPosUpdated (pos_event_handler handler, Control &receiver)
 
void OnVerticalScrollRangeUpdated (range_event_handler handler, Control &receiver)
 
int PageHeight () const
 
int PageWidth () const
 
pcl::Point ScrollPosition () const
 
void SetHorizontalScrollPosition (int horzPos)
 
void SetHorizontalScrollRange (int minPos, int maxPos)
 
void SetLineHeight (int height)
 
void SetLineSize (int width, int height)
 
void SetLineWidth (int width)
 
void SetPageHeight (int height)
 
void SetPageSize (int width, int height)
 
void SetPageWidth (int width)
 
void SetScrollPosition (const pcl::Point &pos)
 
void SetScrollPosition (int horzPos, int vertPos)
 
void SetVerticalScrollPosition (int vertPos)
 
void SetVerticalScrollRange (int minPos, int maxPos)
 
void ShowHorizontalScrollBar (bool show=true)
 
void ShowScrollBars (bool showHorz=true, bool showVert=true)
 
void ShowVerticalScrollBar (bool show=true)
 
int VerticalScrollPosition () const
 
ControlViewport ()
 
const ControlViewport () const
 
- Public Member Functions inherited from pcl::Frame
 Frame (Control &parent=Control::Null())
 
 ~Frame () override
 
int BorderWidth () const
 
int LineWidth () const
 
int ScaledBorderWidth () const
 
int ScaledLineWidth () const
 
void SetLineWidth (int)
 
void SetScaledLineWidth (int width)
 
void SetStyle (style)
 
style Style () const
 
- Public Member Functions inherited from pcl::Control
 Control (const Control &)=delete
 
 Control (Control &&)=delete
 
 Control (Control &parent=Null(), uint32=0)
 
 ~Control () override
 
void ActivateRealTimePreview ()
 
void ActivateTrackView ()
 
void ActivateWindow ()
 
void AdjustToContents ()
 
RGBA AlternateCanvasColor () const
 
RGBA BackgroundColor () const
 
pcl::Rect BoundsRect () const
 
void BringToFront ()
 
RGBA ButtonColor () const
 
RGBA ButtonTextColor () const
 
bool CanUpdate () const
 
RGBA CanvasColor ()
 
ControlChildByPos (const pcl::Point &p) const
 
ControlChildByPos (int x, int y) const
 
pcl::Rect ChildrenRect () const
 
ControlChildToFocus () const
 
void ClearInfoText ()
 
int ClientHeight () const
 
pcl::Rect ClientRect () const
 
int ClientWidth () const
 
void ControlToLocal (const Control &, int &x, int &y) const
 
pcl::Point ControlToLocal (const Control &w, const pcl::Point &p) const
 
pcl::Cursor Cursor () const
 
void DeactivateRealTimePreview ()
 
void DeactivateTrackView ()
 
void Disable (bool disabled=true)
 
void DisableExpansion (bool horzDisable=true, bool vertDisable=true)
 
void DisableMouseTracking (bool disable=true)
 
void DisableUpdates (bool disable=true)
 
double DisplayPixelRatio () const
 
virtual void Enable (bool enabled=true)
 
void EnableExpansion (bool horzEnable=true, bool vertEnable=true)
 
void EnableMouseTracking (bool=true)
 
void EnableUpdates (bool enable=true)
 
void EnsureLayoutUpdated ()
 
void EnsureUnique () override
 
void Focus (bool focus=true)
 
ControlFocusedChild () const
 
FocusStyles FocusStyle () const
 
pcl::Font Font () const
 
RGBA ForegroundColor () const
 
int FrameHeight () const
 
pcl::Rect FrameRect () const
 
int FrameWidth () const
 
pcl::Cursor GetCursor () const
 
pcl::Font GetFont () const
 
void GetMaxSize (int &w, int &h) const
 
void GetMinSize (int &w, int &h) const
 
void GetScaledMaxSize (int &w, int &h) const
 
void GetScaledMinSize (int &w, int &h) const
 
pcl::Sizer GetSizer () const
 
pcl::Point GlobalToLocal (const pcl::Point &p) const
 
void GlobalToLocal (int &x, int &y) const
 
int Height () const
 
void Hide ()
 
RGBA HighlightColor () const
 
RGBA HighlightedTextColor () const
 
String InfoText () const
 
bool IsActiveWindow () const
 
bool IsAncestorOf (const Control &) const
 
virtual bool IsEnabled () const
 
bool IsFixedHeight () const
 
bool IsFixedWidth () const
 
bool IsFocused () const
 
bool IsHidden () const
 
bool IsHorizontalExpansionEnabled () const
 
bool IsMaximized () const
 
bool IsMinimized () const
 
bool IsModal () const
 
bool IsMouseTrackingEnabled () const
 
bool IsRealTimePreviewActive () const
 
bool IsTrackViewActive () const
 
bool IsUnderMouse () const
 
bool IsVerticalExpansionEnabled () const
 
bool IsVisible () const
 
bool IsWindow () const
 
void LocalToControl (const Control &, int &x, int &y) const
 
pcl::Point LocalToControl (const Control &w, const pcl::Point &p) const
 
pcl::Point LocalToGlobal (const pcl::Point &p) const
 
void LocalToGlobal (int &x, int &y) const
 
pcl::Point LocalToParent (const pcl::Point &p) const
 
void LocalToParent (int &x, int &y) const
 
int LogicalPixelsToPhysical (int size) const
 
int LogicalPixelsToResource (int size) const
 
int MaxHeight () const
 
int MaxWidth () const
 
int MinHeight () const
 
int MinWidth () const
 
void Move (const pcl::Point &p)
 
void Move (int x, int y)
 
ControlNextSiblingToFocus () const
 
void OnChildCreate (child_event_handler, Control &)
 
void OnChildDestroy (child_event_handler, Control &)
 
void OnClose (close_event_handler, Control &)
 
void OnDestroy (event_handler, Control &)
 
void OnEnter (event_handler, Control &)
 
void OnFileDrag (file_drag_event_handler, Control &)
 
void OnFileDrop (file_drop_event_handler, Control &)
 
void OnGetFocus (event_handler, Control &)
 
void OnHide (event_handler, Control &)
 
void OnKeyPress (keyboard_event_handler, Control &)
 
void OnKeyRelease (keyboard_event_handler, Control &)
 
void OnLeave (event_handler, Control &)
 
void OnLoseFocus (event_handler, Control &)
 
void OnMouseDoubleClick (mouse_event_handler, Control &)
 
void OnMouseMove (mouse_event_handler, Control &)
 
void OnMousePress (mouse_button_event_handler, Control &)
 
void OnMouseRelease (mouse_button_event_handler, Control &)
 
void OnMouseWheel (mouse_wheel_event_handler, Control &)
 
void OnMove (move_event_handler, Control &)
 
void OnPaint (paint_event_handler, Control &)
 
void OnResize (resize_event_handler, Control &)
 
void OnShow (event_handler, Control &)
 
void OnViewDrag (view_drag_event_handler, Control &)
 
void OnViewDrop (view_drop_event_handler, Control &)
 
Controloperator= (const Control &)=delete
 
Controloperator= (Control &&)=delete
 
ControlParent () const
 
pcl::Point ParentToLocal (const pcl::Point &p) const
 
void ParentToLocal (int &x, int &y) const
 
int PhysicalPixelsToLogical (int size) const
 
pcl::Point Position () const
 
void Repaint ()
 
void Repaint (const pcl::Rect &r)
 
void Repaint (int x0, int y0, int x1, int y1)
 
void Resize (int w, int h)
 
double ResourcePixelRatio () const
 
int ResourcePixelsToLogical (int size) const
 
void Restyle ()
 
Point ScaledCursorHotSpot (const Point &hotSpot) const
 
Point ScaledCursorHotSpot (int xHot, int yHot) const
 
int ScaledMaxHeight () const
 
int ScaledMaxWidth () const
 
int ScaledMinHeight () const
 
int ScaledMinWidth () const
 
template<class R >
String ScaledResource (R resource) const
 
template<class S >
String ScaledStyleSheet (S cssCode, int fontDPI=0) const
 
void Scroll (const pcl::Point &d)
 
void Scroll (const pcl::Point &d, const pcl::Rect &r)
 
void Scroll (int dx, int dy)
 
void Scroll (int dx, int dy, int x0, int y0, int x1, int y1)
 
void SendToBack ()
 
void SetAlternateCanvasColor (RGBA)
 
void SetBackgroundColor (RGBA)
 
void SetButtonColor (RGBA)
 
void SetButtonTextColor (RGBA)
 
void SetCanvasColor (RGBA)
 
void SetChildToFocus (Control &)
 
void SetClientRect (const pcl::Rect &r)
 
void SetClientRect (int x0, int y0, int x1, int y1)
 
void SetCursor (const pcl::Cursor &)
 
void SetCursorToParent ()
 
void SetFixedHeight ()
 
void SetFixedHeight (int h)
 
void SetFixedSize ()
 
void SetFixedSize (int w, int h)
 
void SetFixedWidth ()
 
void SetFixedWidth (int w)
 
void SetFocusStyle (FocusStyles)
 
void SetFont (const pcl::Font &)
 
void SetForegroundColor (RGBA)
 
void SetHighlightColor (RGBA)
 
void SetHighlightedTextColor (RGBA)
 
void SetInfoText (const String &)
 
void SetMaxHeight ()
 
void SetMaxHeight (int h)
 
void SetMaxSize ()
 
void SetMaxSize (int w, int h)
 
void SetMaxWidth ()
 
void SetMaxWidth (int w)
 
void SetMinHeight ()
 
void SetMinHeight (int h)
 
void SetMinSize ()
 
void SetMinSize (int w, int h)
 
void SetMinWidth ()
 
void SetMinWidth (int w)
 
void SetNextSiblingToFocus (Control &)
 
void SetParent (Control &)
 
void SetRealTimePreviewActive (bool=true)
 
void SetScaledFixedHeight (int h)
 
void SetScaledFixedSize (int w, int h)
 
void SetScaledFixedWidth (int w)
 
void SetScaledMaxHeight (int h)
 
void SetScaledMaxSize (int w, int h)
 
void SetScaledMaxWidth (int w)
 
void SetScaledMinHeight (int h)
 
void SetScaledMinSize (int w, int h)
 
void SetScaledMinWidth (int w)
 
void SetSizer (pcl::Sizer &)
 
void SetStyleSheet (const String &css)
 
void SetTextColor (RGBA)
 
void SetToolTip (const String &)
 
void SetTrackViewActive (bool=true)
 
void SetVariableHeight ()
 
void SetVariableSize ()
 
void SetVariableWidth ()
 
void SetVisible (bool visible)
 
void SetWindowOpacity (double)
 
void SetWindowTitle (const String &)
 
void Show ()
 
pcl::Sizer Sizer () const
 
void StackUnder (Control &)
 
String StyleSheet () const
 
RGBA TextColor () const
 
String ToolTip () const
 
void Unfocus ()
 
void Update ()
 
void Update (const pcl::Rect &r)
 
void Update (int x0, int y0, int x1, int y1)
 
pcl::Rect VisibleRect () const
 
int Width () const
 
ControlWindow () const
 
double WindowOpacity () const
 
String WindowTitle () const
 
int X () const
 
int Y () const
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
bool IsAlias () const
 
bool IsGarbage () const
 
bool IsNull () const
 
bool IsSameObject (const UIObject &o) const
 
bool IsUnique () const
 
String ObjectId () const
 
IsoString ObjectType () const
 
bool operator< (const UIObject &o) const
 
bool operator== (const UIObject &o) const
 
size_type RefCount () const
 
void SetObjectId (const String &id)
 

Additional Inherited Members

- Static Public Member Functions inherited from pcl::Control
static void HideToolTip ()
 
static ControlNull ()
 
static void ShowToolTip (const Point &pos, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0))
 
static void ShowToolTip (int x, int y, const String &text, const Control &control=Control::Null(), const Rect &rect=Rect(0))
 
static String ToolTipText ()
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 
- Protected Member Functions inherited from pcl::UIObject
 UIObject ()=default
 
 UIObject (const UIObject &x)
 
 UIObject (UIObject &&x)
 
UIObjectoperator= (const UIObject &x)
 
UIObjectoperator= (UIObject &&x)
 

Detailed Description

TODO: Write a detailed description for ImageView.

See also
ImageWindow

Definition at line 79 of file ImageView.h.

Member Typedef Documentation

◆ background_brush

using pcl::ImageView::background_brush = BackgroundBrush::value_type

Represents a transparency background brush supported by the PixInsight core application. Valid transparency brushes are defined in the BackgroundBrush namespace.

Definition at line 101 of file ImageView.h.

◆ display_channel

using pcl::ImageView::display_channel = DisplayChannel::value_type

Represents a display image channel supported by the PixInsight core application. Valid display channels and components are defined in the DisplayChannel namespace.

Definition at line 94 of file ImageView.h.

◆ gui_mode

using pcl::ImageView::gui_mode = ImageMode::value_type

Represents a GUI working mode. Valid modes are defined in the ImageMode namespace.

Definition at line 87 of file ImageView.h.

◆ transparency_mode

using pcl::ImageView::transparency_mode = TransparencyMode::value_type

Represents a transparency rendering mode supported by the PixInsight core application. Valid transparency rendering modes are defined in the TransparencyMode namespace.

Definition at line 108 of file ImageView.h.

Constructor & Destructor Documentation

◆ ImageView()

pcl::ImageView::ImageView ( Control parent = Control::Null(),
int  width = 0,
int  height = 0,
int  numberOfChannels = 1,
int  bitsPerSample = 32,
bool  floatSample = true,
bool  color = false 
)

Creates a new ImageView control with the specified image parameters.

Parameters
parentParent control of the newly created ImageView.
widthImage width in pixels. Must be >= 0. There is no specific upper limit. If zero is specified, the ImageView will contain an empty image. The default value is zero.
heightImage width in pixels. Must be >= 0. There is no specific upper limit. If zero is specified, the ImageView will contain an empty image. The default value is zero.
numberOfChannelsNumber of channels in the image. Must be >= 0. There is no specific upper limit. If zero is specified, the ImageView will contain an empty image. If a value > 0 is specified, it should not be less than the number of nominal channels: 1 for grayscale images, 3 for color images. Channels in excess of nominal channels are generated as alpha channels. The default value is one.
bitsPerSampleNumber of bits per sample. Supported values are 8, 16 and 32 for integer images; 32 and 64 for floating point images. The default value is 32.
floatSampleTrue to create a floating point image; false to create an integer image. The default value is true.
colorTrue to create an RGB color image; false to create a grayscale image. The default value is false.

If not empty, all nominal and alpha channels of the newly created image are initialized with zero pixel sample values (black pixels).

◆ ~ImageView()

pcl::ImageView::~ImageView ( )
inlineoverride

Destroys an ImageView control.

Definition at line 151 of file ImageView.h.

Member Function Documentation

◆ BeginSelection() [1/2]

void pcl::ImageView::BeginSelection ( const Point p,
uint32  flags = 0 
)
inline

Begins a new interactive rectangular selection procedure on the viewport of this ImageView control.

Calling this function is equivalent to:

BeginSelection( p.x, p.y, flags );
void BeginSelection(const Point &p, uint32 flags=0)
Definition: ImageView.h:1296

Definition at line 1296 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ BeginSelection() [2/2]

void pcl::ImageView::BeginSelection ( int  x,
int  y,
uint32  flags = 0 
)

Starts a new interactive rectangular selection procedure on the viewport of this ImageView control.

Parameters
x,yImage coordinates of the starting point of a new rectangular selection.
flagsCurrently not used; reserved for future extensions of PCL. Must be set to zero.

Interfaces typically use BeginSelection() in response to an OnMousePress event to start a rectangular selection. ModifySelection() is then called from an OnMouseMove event handler, and the final selection coordinates are obtained by calling SelectionRect() from an OnMouseRelease event handler.

◆ CancelSelection()

void pcl::ImageView::CancelSelection ( )

Aborts the current interactive selection procedure.

◆ CommitPendingUpdates()

void pcl::ImageView::CommitPendingUpdates ( )

Executes all pending viewport update requests for this ImageView control.

Viewport update requests are not executed immediately by the core PixInsight application. For the sake of performance, The GUI tries to optimize screen updates by performing the minimum possible redrawing work.

This means that update requests are placed on a queue, waiting while the main GUI thread is busy or until a sufficiently large update region becomes available.

With this function, an interface can force the immediate screen update for all pending update viewport regions. If multiple update regions are pending, the core application will still minimize the required drawing work by grouping all of them into the minimum possible amount of larger regions.

◆ CurrentAlphaChannel()

int pcl::ImageView::CurrentAlphaChannel ( ) const
inline

Returns the alpha channel index displayed for the image in this ImageView control. If the current display channel does not correspond to an alpha channel, a negative integer value is returned.

Alpha channel indices are relative to the first alpha channel in an image. For example, the first alpha channel is always indexed as alpha channel #0, and so on.

Definition at line 487 of file ImageView.h.

◆ CurrentChannel()

display_channel pcl::ImageView::CurrentChannel ( ) const

Returns the current display channel for this ImageView control.

The returned value can be identified with the symbolic constants defined int the DisplayChannel namespace.

◆ CurrentMode()

gui_mode pcl::ImageView::CurrentMode ( ) const

Returns the current GUI working mode for this ImageView control.

The returned value can be identified with the symbolic constants defined in the ImageMode namespace.

◆ DeleteICCProfile()

void pcl::ImageView::DeleteICCProfile ( )

Causes the image in this ImageView control to be associated with the default ICC profile globally defined in the PixInsight core application.

If this control has its own associated ICC profile, this funtion destroys it and frees its allocated space.

If this control is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

◆ DisableColorManagement()

void pcl::ImageView::DisableColorManagement ( bool  disable = true)
inline

Disables color management for the image in this ImageView control.

See the documentation for EnableColorManagement() for additional information on color management in PixInsight.

If this control is visible, its screen rendition is updated immediately after calling this function.

Definition at line 291 of file ImageView.h.

◆ DisableGamutCheck()

void pcl::ImageView::DisableGamutCheck ( bool  disable = true)
inline

Disables the gamut check proofing feature for the image in this ImageView control.

See the documentation for EnableGamutCheck() for additional information on the gamut check color proofing feature.

If this control is visible, has color management enabled, and has soft proofing enabled, its screen rendition is updated immediately after calling this function. If color proofing is disabled, calling this function has no effect.

Definition at line 365 of file ImageView.h.

◆ DisableProofing()

void pcl::ImageView::DisableProofing ( bool  disable = true)
inline

Disables soft-proofing for the image in this ImageView control.

See the documentation for EnableProofing() for additional information on color proofing.

If this control is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

Definition at line 326 of file ImageView.h.

◆ EnableColorManagement()

void pcl::ImageView::EnableColorManagement ( bool  = true)

Enables color management for the image in this ImageView control.

Color management uses ICC profiles for the image in this control (either a profile associated with the image or a global profile) and the monitor device to control how the image is rendered on the screen. Color management transformations are applied to yield a visual representation that takes into account the actual meaning of numerical pixel sample values, considering the chromatic responses of the screen and of the devices and color spaces that have originated the image.

If color management is disabled for an image, its pixel sample values are sent directly to the screen, avoiding ICC profile transformations. This improves output performance, but may give a false representation of the image on the screen.

If this control is visible, its screen rendition is updated immediately after calling this function.

◆ EnableGamutCheck()

void pcl::ImageView::EnableGamutCheck ( bool  = true)

Enables the gamut check proofing feature for the image in this ImageView control.

The gamut check feature represents out-of-gamut colors (i.e., colors that are not defined in the color space of the image) with a special color (selectable via global color management preferences) for quick visual detection.

If this control is visible, has color management enabled, and has soft proofing enabled, its screen rendition is updated immediately after calling this function. If color proofing is disabled, calling this function has no effect.

◆ EnableProofing()

void pcl::ImageView::EnableProofing ( bool  = true)

Enables soft-proofing for the image in this ImageView control.

Color proofing is used to emulate an output device (usually a printer) on the screen. Proofing requires three ICC profiles: the image profile (either an embedded profile or the default profile), the monitor profile, and a proofing profile that describes the emulated device. Color proofing is useful to preview the final printed result without rendering images to physical media.

If this control is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

◆ EndSelection()

void pcl::ImageView::EndSelection ( )

Terminates the current interactive selection procedure.

◆ GetICCProfile()

bool pcl::ImageView::GetICCProfile ( ICCProfile icc) const

Obtains a copy of the current ICC profile associated with the image in this ImageView control.

Parameters
[out]iccReference to an object where a copy of the current ICC profile will be stored.

◆ GetImageGeometry()

void pcl::ImageView::GetImageGeometry ( int &  width,
int &  height,
int &  numberOfChannels 
) const

Copies the width and height in pixels, and the number of channels of the image in this ImageView control to the specified variables.

◆ GetRGBWS()

void pcl::ImageView::GetRGBWS ( RGBColorSystem rgbws) const

Obtains a copy of the RGB working space (RGBWS) associated with the image owned by this ImageView control.

Parameters
[out]rgbwsReference to an object where the parameters of the current RGBWS will be copied.

◆ GetSampleFormat()

void pcl::ImageView::GetSampleFormat ( int &  bitsPerSample,
bool &  floatSample 
) const

Retrieves the pixel sample data format used by the image owned by this ImageView control.

Parameters
[out]bitsPerSampleOn output, will be equal to the number of bits per sample used by the image. Can be 8, 16 or 32 for an integer image; 32 or 64 for a floating point image.
[out]floatSampleOn output, will be true if the image uses floating point samples; false if it uses integer samples.

◆ GetViewportSize()

void pcl::ImageView::GetViewportSize ( int &  width,
int &  height 
) const

Gets the current sizes of the viewport in this ImageView control.

Parameters
[out]widthReference to a variable where the viewport width in pixels will be stored.
[out]heightReference to a variable where the viewport height in pixels will be stored.

The provided sizes represent the entire image in this control, as represented on its viewport after applying the current zoom factor. Viewport sizes can also be thought of as the available navigation ranges in an ImageView control.

◆ GlobalToViewport() [1/3]

Point pcl::ImageView::GlobalToViewport ( const Point p) const
inline

Converts a point p in the global coordinate system to the viewport coordinate system. Returns a point with the resulting viewport coordinates.

Definition at line 1062 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ GlobalToViewport() [2/3]

Rect pcl::ImageView::GlobalToViewport ( const Rect r) const
inline

Converts a rectangle r in the global coordinate system to the viewport coordinate system. Returns a rectangle with the resulting viewport coordinates.

Definition at line 1074 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ GlobalToViewport() [3/3]

void pcl::ImageView::GlobalToViewport ( int &  x,
int &  y 
) const

Converts the specified x and y integer coordinates from the global coordinate system to the viewport coordinate system.

The converted viewport coordinates are rounded to the nearest integers.

◆ HasPendingUpdates()

bool pcl::ImageView::HasPendingUpdates ( ) const

Returns true iff there are pending viewport updates for this ImageView control.

◆ HideTransparency()

void pcl::ImageView::HideTransparency ( )
inline

Disables transparency renditions for this ImageView control.

Calling this function is equivalent to:

SetTransparencyMode( pcl::TransparencyMode::Hide );
void SetTransparencyMode(transparency_mode mode, RGBA color=0)

Definition at line 559 of file ImageView.h.

◆ Image()

ImageVariant pcl::ImageView::Image ( ) const

Returns an ImageVariant instance that transports the image owned by this ImageView control.

The returned ImageVariant object transports a shared image. A shared image is a managed alias for an actual image living in the PixInsight core application. This is because a GUI control is also a managed object.

◆ ImageBounds()

Rect pcl::ImageView::ImageBounds ( ) const
inline

Returns the bounding rectangle of the image in this ImageView control. The upper left corner of the returned rectangle (x0, y0) is always (0,0). The lower right corner coordinates (x1, y1) correspond to the width and height of the image.

Definition at line 200 of file ImageView.h.

◆ ImageHeight()

int pcl::ImageView::ImageHeight ( ) const
inline

Returns the height in pixels of the image in this ImageView control.

Definition at line 189 of file ImageView.h.

◆ ImageScalarToViewport() [1/4]

void pcl::ImageView::ImageScalarToViewport ( double *  d,
size_type  n 
) const

Converts a set of real floating-point scalars from the image coordinate system to the viewport coordinate system.

Parameters
dPointer to the first element in the array of scalars that will be converted from image coordinates to viewport coordinates.
nNumber of scalars in the p array.

◆ ImageScalarToViewport() [2/4]

double pcl::ImageView::ImageScalarToViewport ( double  ) const

Converts a real floating-point scalar d in the image coordinate system to the viewport coordinate system. Returns the resulting scalar in viewport coordinates.

◆ ImageScalarToViewport() [3/4]

void pcl::ImageView::ImageScalarToViewport ( int *  d,
size_type  n 
) const

Converts a set of integer scalars from the image coordinate system to the viewport coordinate system.

Parameters
dPointer to the first element in the array of scalars that will be converted from image coordinates to viewport coordinates.
nNumber of scalars in the p array.

Converted scalars in viewport coordinates are rounded to the nearest integers.

◆ ImageScalarToViewport() [4/4]

int pcl::ImageView::ImageScalarToViewport ( int  ) const

Converts an integer scalar d in the image coordinate system to the viewport coordinate system. Returns the resulting scalar in viewport coordinates.

The resulting scalar in viewport coordinates is rounded to the nearest integer.

◆ ImageToViewport() [1/7]

template<typename T >
void pcl::ImageView::ImageToViewport ( Array< GenericPoint< T > > &  a) const
inline

Converts a set of points in a dynamic array from the image coordinate system to the viewport coordinate system.

Parameters
aReference to a dynamic array of points that will be converted from image coordinates to viewport coordinates.

Definition at line 968 of file ImageView.h.

◆ ImageToViewport() [2/7]

template<typename T >
GenericPoint<T> pcl::ImageView::ImageToViewport ( const GenericPoint< T > &  p) const
inline

Converts a point p in the image coordinate system to the viewport coordinate system. Returns a point with the resulting viewport coordinates.

If the template argument T corresponds to an integer type, the converted viewport coordinates in the resulting point are rounded to the nearest integers.

Definition at line 911 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ImageToViewport() [3/7]

template<typename T >
GenericRectangle<T> pcl::ImageView::ImageToViewport ( const GenericRectangle< T > &  r) const
inline

Converts a rectangle r in the image coordinate system to the viewport coordinate system. Returns a rectangle with the resulting viewport coordinates.

If the template argument T corresponds to an integer type, the converted viewport coordinates in the resulting rectangle are rounded to the nearest integers.

Definition at line 928 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ ImageToViewport() [4/7]

void pcl::ImageView::ImageToViewport ( double &  x,
double &  y 
) const

Converts the specified x and y real floating-point coordinates from the image coordinate system to the viewport coordinate system.

◆ ImageToViewport() [5/7]

void pcl::ImageView::ImageToViewport ( DPoint p,
size_type  n 
) const

Converts a set of real floating-point points from the image coordinate system to the viewport coordinate system.

Parameters
pPointer to the first point in the array of points that will be converted from image coordinates to viewport coordinates.
nNumber of points in the p array.

◆ ImageToViewport() [6/7]

void pcl::ImageView::ImageToViewport ( int &  x,
int &  y 
) const

Converts the specified x and y integer coordinates from the image coordinate system to the viewport coordinate system.

The converted viewport coordinates are rounded to the nearest integers.

◆ ImageToViewport() [7/7]

void pcl::ImageView::ImageToViewport ( Point p,
size_type  n 
) const

Converts a set of integer points from the image coordinate system to the viewport coordinate system.

Parameters
pPointer to the first point in the array of points that will be converted from image coordinates to viewport coordinates.
nNumber of points in the p array.

Converted point viewport coordinates are rounded to the nearest integers.

◆ ImageWidth()

int pcl::ImageView::ImageWidth ( ) const
inline

Returns the width in pixels of the image in this ImageView control.

Definition at line 181 of file ImageView.h.

◆ IsAlphaChannelDisplayed()

bool pcl::ImageView::IsAlphaChannelDisplayed ( ) const
inline

Returns true iff the current display channel for this ImageView control corresponds to an alpha channel of the image.

Definition at line 473 of file ImageView.h.

◆ IsColorImage()

bool pcl::ImageView::IsColorImage ( ) const

Returns true iff this ImageView control holds a color image, false if it is a grayscale image.

◆ IsColorManagementEnabled()

bool pcl::ImageView::IsColorManagementEnabled ( ) const

Returns true iff color management is active for the image in this ImageView control.

◆ IsGamutCheckEnabled()

bool pcl::ImageView::IsGamutCheckEnabled ( ) const

Returns true iff the gamut check soft-proofing feature is currently enabled for the image in this ImageView control.

◆ IsProofingEnabled()

bool pcl::ImageView::IsProofingEnabled ( ) const

Returns true iff soft-proofing is currently enabled for the image in this ImageView control.

◆ IsSelection()

bool pcl::ImageView::IsSelection ( ) const

Returns true iff an interactive selection procedure is currently active on the viewport of this ImageView control.

◆ IsTransparencyVisible()

bool pcl::ImageView::IsTransparencyVisible ( ) const
inline

Returns true iff transparent image areas are currently visible for this ImageView control.

Transparencies are visible if the current rendering mode is not TransparencyMode::Hide.

Definition at line 533 of file ImageView.h.

◆ ModifySelection() [1/2]

void pcl::ImageView::ModifySelection ( const Point p,
uint32  flags = 0 
)
inline

Updates an ongoing interactive rectangular selection procedure on the viewport of this ImageView control.

Calling this function is equivalent to:

ModifySelection( p.x, p.y, flags );
void ModifySelection(const Point &p, uint32 flags=0)
Definition: ImageView.h:1327

Definition at line 1327 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ModifySelection() [2/2]

void pcl::ImageView::ModifySelection ( int  x,
int  y,
uint32  flags = 0 
)

Updates an ongoing interactive rectangular selection procedure on the viewport of this ImageView control.

Parameters
x,yImage coordinates to update the current rectangular selection. The selection rectangle is defined by this position and the starting position defined in the call to BeginSelection() that originated the current selection procedure.
flagsCurrently not used; reserved for future extensions of PCL. Must be set to zero.

◆ Regenerate()

void pcl::ImageView::Regenerate ( )

Regenerates the screen rendition for the visible viewport region in this ImageView control.

◆ RegenerateImageRect() [1/2]

void pcl::ImageView::RegenerateImageRect ( const pcl::DRect r)
inline

Regenerates the screen rendition for a rectangular region of the viewport, specified in image coordinates.

Calling this function is equivalent to:

RegenerateImageRect( r.x0, r.y0, r.x1, r.y1 );
void RegenerateImageRect(const pcl::DRect &r)
Definition: ImageView.h:1137

Definition at line 1137 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ RegenerateImageRect() [2/2]

void pcl::ImageView::RegenerateImageRect ( double  x0,
double  y0,
double  x1,
double  y1 
)

Regenerates the screen rendition for a rectangular region of the viewport, specified in image coordinates.

Parameters
x0,y0Image coordinates (horizontal, vertical) of the upper left corner of the regenerated region.
x1,y1Image coordinates (horizontal, vertical) of the lower right corner of the regenerated region.

The specified region will be updated on the screen. Only the visible portion of the specified region will be regenerated and updated, that is, its intersection with the visible viewport region.

◆ RegenerateViewportRect() [1/2]

void pcl::ImageView::RegenerateViewportRect ( const Rect r)
inline

Regenerates the screen rendition for a rectangular region of the viewport, specified in viewport coordinates.

Calling this function is equivalent to:

RegenerateViewportRect( r.x0, r.y0, r.x1, r.y1 );
void RegenerateViewportRect(const Rect &r)
Definition: ImageView.h:1108

Definition at line 1108 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ RegenerateViewportRect() [2/2]

void pcl::ImageView::RegenerateViewportRect ( int  x0,
int  y0,
int  x1,
int  y1 
)

Regenerates the screen rendition for a rectangular region of the viewport, specified in viewport coordinates.

Parameters
x0,y0Viewport coordinates (horizontal, vertical) of the upper left corner of the regenerated region.
x1,y1Viewport coordinates (horizontal, vertical) of the lower right corner of the regenerated region.

The specified region will be updated on the screen. Only the visible portion of the specified region will be regenerated and updated, that is, its intersection with the visible viewport region.

◆ Reset()

void pcl::ImageView::Reset ( )
inline

Causes a complete regeneration of the whole viewport and its associated UI resources.

Calling this function may be necessary to force a regeneration after changing the geometry of the image owned by this ImageView control.

Definition at line 1089 of file ImageView.h.

◆ SelectChannel()

void pcl::ImageView::SelectChannel ( display_channel  channel)

Selects the current display channel for this ImageView control.

Parameters
channelSpecifies the new display channel. Supported display channels are enumerated in the DisplayChannel namespace.

Not all display channels are valid for all images in all contexts. For example, if the image in the current view is a grayscale image, the only valid display channels are the combined RGB/K channel (DisplayChannel::RGBK) and, if the image has n alpha channels, values in the range DisplayChannel::Alpha to DisplayChannel::Alpha+n-1. If an invalid display channel is specified, this function is simply ignored.

◆ SelectionRect()

Rect pcl::ImageView::SelectionRect ( uint32 flags = 0) const

Returns the current rectangular selection in image coordinates.

Parameters
flagsCurrently not used; reserved for future extensions of PCL. Must be set to zero.

Before calling this function, a rectangular selection procedure should have been started with BeginSelection().

◆ SelectMode()

void pcl::ImageView::SelectMode ( gui_mode  mode)

Sets the current GUI working mode for this ImageView control.

Parameters
modeSpecifies the new GUI mode. Supported modes are identified through symbolic constants defined in the ImageMode namespace.

Preview edition and dynamic modes are not valid for ImageView. The only valid GUI working modes are:

ImageMode::Readout
ImageMode::ZoomIn
ImageMode::ZoomOut
ImageMode::Pan
ImageMode::Center

◆ SetColorManagementFeatures()

void pcl::ImageView::SetColorManagementFeatures ( bool  cmEnabled,
bool  proofing,
bool  gamutCheck 
)

Allows enabling or disabling all color management features at once for this ImageView control.

Parameters
cmEnabledEnables (if true) or disables (if false) color management for the image in this control.
proofingEnables (if true) or disables (if false) soft-proofing for the image in this control.
gamutCheckEnables (if true) or disables (if false) the gamut check proofing feature. The state of this argument has no meaning if the proofing parameter is false.

If this control is visible, its screen rendition is updated immediately after calling this function.

◆ SetICCProfile() [1/2]

void pcl::ImageView::SetICCProfile ( const ICCProfile icc)

Sets the current ICC profile for the image in this ImageView control as a copy of an existing ICC profile.

Parameters
iccReference to an object that will be used to set the current ICC profile.

If this control is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

◆ SetICCProfile() [2/2]

void pcl::ImageView::SetICCProfile ( const String filePath)

Sets the current ICC profile for the image in this ImageView control as a copy of an ICC profile loaded from a disk file.

Parameters
filePathA file path specification to an ICC profile that will be loaded and copied to the ICC profile of the image.

If this control is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

◆ SetRGBWS()

void pcl::ImageView::SetRGBWS ( const RGBColorSystem rgbws)

Sets the RGB working space (RGBWS) for the image owned by this ImageView control.

Parameters
rgbwsReference to a RGBWS that will be associated with the image owned by this object.

◆ SetSampleFormat()

void pcl::ImageView::SetSampleFormat ( int  bitsPerSample,
bool  floatSample 
)

Converts the image owned by this ImageView control to the specified sample data format.

Parameters
bitsPerSampleNumber of bits per sample. Can be 8, 16 or 32 for an integer image; 32 or 64 for a floating point image.
floatSampleTrue to transform the image to a floating point data format; false to transform the image to an integer data format.

This function does nothing if the image in this control already has the specified sample data format.

◆ SetTransparencyMode()

void pcl::ImageView::SetTransparencyMode ( transparency_mode  mode,
RGBA  color = 0 
)

Sets the current transparency rendering mode for this ImageView control.

Parameters
modeSpecifies the new mode that will be used to render transparent regions of images. Supported transparency modes are identified through symbolic constants defined in the TransparencyMode namespace.
colorNew color that will be used when the transparency mode is TransparencyMode::Color. If zero is specified (the default value), the current color will not be changed.

◆ SetViewport() [1/2]

void pcl::ImageView::SetViewport ( const DPoint center,
int  zoom = 0 
)
inline

Sets new viewport central location and zoom factor for this ImageView control.

Calling this function is equivalent to:

SetViewport( center.x, center.y, int );
void SetViewport(double cx, double cy, int zoom=0)

See the documentation for SetViewport( double, double, int ).

Definition at line 619 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ SetViewport() [2/2]

void pcl::ImageView::SetViewport ( double  cx,
double  cy,
int  zoom = 0 
)

Sets new viewport central location coordinates and zoom factor for this ImageView control.

Parameters
cx,cyPosition (horizontal, vertical) of the new central viewport location in image coordinates.
zoomNew viewport zoom factor. Positive zoom factors are interpreted as magnifying factors; negative zoom factors are reduction factors:
          A zoom factor of -1 should not be used explicitly; it is a
           reserved value for internal use, and there is no guarantee
           that future versions of PCL continue accepting it.

If the specified viewport location cannot correspond to the viewport central position with the specified zoom factor, the nearest image coordinates are always selected automatically. For example, if you pass image coordinates cx=0 and cy=0 as arguments to this function, the GUI will set the viewport center to the necessary image location in order to display the upper left corner of the image just at the upper left corner of the viewport.

If the zoom argument is not specified, the current zoom factor is not changed since the default value of this parameter is zero; see the table above.

If this control is visible, calling this function causes an immediate regeneration of the screen rendition for the visible viewport region.

◆ SetViewportPosition() [1/2]

void pcl::ImageView::SetViewportPosition ( const Point p)
inline

Sets the viewport position in this ImageView control to the specified position p in viewport coordinates.

Calling this function is equivalent to:

SetViewportPosition( p.x, p.y );
void SetViewportPosition(int x, int y)

Definition at line 732 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ SetViewportPosition() [2/2]

void pcl::ImageView::SetViewportPosition ( int  x,
int  y 
)

Sets the viewport position in this ImageView control to the specified x and y viewport coordinates.

If this control is visible, calling this function causes an immediate regeneration of the screen rendition for the visible viewport region.

◆ SetZoomFactor()

void pcl::ImageView::SetZoomFactor ( int  z)

Sets the zoom factor for the viewport of this ImageView control to the specified value z.

To learn how zoom factors are interpreted in PixInsight, see the documentation for SetViewport( double, double, int ).

◆ TransparencyColor()

RGBA pcl::ImageView::TransparencyColor ( ) const

Returns the color used in this ImageView control to render transparent image regions, when the transparency mode is TransparencyMode::Color.

The returned color is an AARRGGBB value. The alpha value is always 0xff, since the transparency background cannot be transparent.

◆ TransparencyMode()

transparency_mode pcl::ImageView::TransparencyMode ( ) const

Returns the current transparency rendering mode for this ImageView control.

Supported transparency modes are defined in the TransparencyMode namespace.

◆ UpdateImageRect() [1/2]

void pcl::ImageView::UpdateImageRect ( const pcl::DRect r)
inline

Requests a screen update for a rectangular region of the viewport, specified in image coordinates.

Calling this function is equivalent to:

UpdateImageRect( r.x0, r.y0, r.x1, r.y1 );
void UpdateImageRect(const pcl::DRect &r)
Definition: ImageView.h:1201

Definition at line 1201 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ UpdateImageRect() [2/2]

void pcl::ImageView::UpdateImageRect ( double  x0,
double  y0,
double  x1,
double  y1 
)

Requests a screen update for a rectangular region of the viewport, specified in image coordinates.

Parameters
x0,y0Image coordinates (horizontal, vertical) of the upper left corner of the update region.
x1,y1Image coordinates (horizontal, vertical) of the lower right corner of the update region.

The specified region will be updated on the screen. Only the visible portion of the specified region will be updated, that is, its intersection with the visible viewport region in the image coordinate system.

◆ UpdateSelection()

void pcl::ImageView::UpdateSelection ( )

Requests a screen viewport update for the current rectangular selection.

◆ UpdateViewport()

void pcl::ImageView::UpdateViewport ( )

Requests a screen update for the entire visible viewport region in this ImageView control.

◆ UpdateViewportRect() [1/2]

void pcl::ImageView::UpdateViewportRect ( const Rect r)
inline

Requests a screen update for a rectangular region of the viewport, specified in viewport coordinates.

Calling this function is equivalent to:

UpdateViewportRect( r.x0, r.y0, r.x1, r.y1 );
void UpdateViewportRect(const Rect &r)
Definition: ImageView.h:1172

Definition at line 1172 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ UpdateViewportRect() [2/2]

void pcl::ImageView::UpdateViewportRect ( int  x0,
int  y0,
int  x1,
int  y1 
)

Requests a screen update for a rectangular region of the viewport, specified in viewport coordinates.

Parameters
x0,y0Viewport coordinates (horizontal, vertical) of the upper left corner of the update region.
x1,y1Viewport coordinates (horizontal, vertical) of the lower right corner of the update region.

The specified region will be updated on the screen. Only the visible portion of the specified region will be updated, that is, its intersection with the visible viewport region.

◆ ViewportBitmap() [1/2]

Bitmap pcl::ImageView::ViewportBitmap ( const Rect r,
uint32  flags = 0 
) const
inline

Returns a RGBA bitmap with a screen rendition of a viewport region of this ImageView control.

Calling this function is equivalent to:

ViewportBitmap( r.x0, r.y0, r.x1, r.y1, flags );
Bitmap ViewportBitmap(const Rect &r, uint32 flags=0) const
Definition: ImageView.h:1264

Definition at line 1264 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ ViewportBitmap() [2/2]

Bitmap pcl::ImageView::ViewportBitmap ( int  x0,
int  y0,
int  x1,
int  y1,
uint32  flags = 0 
) const

Returns a RGBA bitmap with a screen rendition of a viewport region of this ImageView control.

Parameters
x0,y0Viewport coordinates (horizontal, vertical) of the upper left corner of the source viewport region.
x1,y1Viewport coordinates (horizontal, vertical) of the lower right corner of the source viewport region.
flagsCurrently not used; reserved for future extensions of PCL. Must be set to zero.

The returned bitmap will contain a screen rendition for the specified source region of the image in this ImageView control. It will be magnified or reduced according to the current zoom factor.

◆ ViewportHeight()

int pcl::ImageView::ViewportHeight ( ) const
inline

Gets the current height of the viewport in this ImageView control.

Definition at line 697 of file ImageView.h.

◆ ViewportPosition()

Point pcl::ImageView::ViewportPosition ( ) const

Returns the current viewport position in this ImageView control.

The viewport position corresponds to the viewport coordinates of the upper left corner of the visible viewport region. These coordinates can be negative if the represented image is smaller than the size of the viewport control, that is, when the extended viewport space is visible around the screen rendition of the image.

◆ ViewportScalarToImage() [1/4]

void pcl::ImageView::ViewportScalarToImage ( double *  d,
size_type  n 
) const

Converts a set of real floating-point scalars from the viewport coordinate system to the image coordinate system.

Parameters
dPointer to the first element in the array of scalars that will be converted from viewport coordinates to image coordinates.
nNumber of scalars in the p array.

◆ ViewportScalarToImage() [2/4]

double pcl::ImageView::ViewportScalarToImage ( double  d) const

Converts a scalar d in the viewport coordinate system to the image coordinate system. Returns the resulting floating point real scalar in image coordinates.

◆ ViewportScalarToImage() [3/4]

void pcl::ImageView::ViewportScalarToImage ( int *  d,
size_type  n 
) const

Converts a set of integer scalars from the viewport coordinate system to the image coordinate system.

Parameters
dPointer to the first element in the array of scalars that will be converted from viewport coordinates to image coordinates.
nNumber of scalars in the p array.

Converted scalars in image coordinates are rounded to the nearest integers.

◆ ViewportScalarToImage() [4/4]

template<typename T >
double pcl::ImageView::ViewportScalarToImage ( d) const
inline

Converts a scalar d in the viewport coordinate system to the image coordinate system. Returns the resulting floating point real scalar in image coordinates.

Definition at line 882 of file ImageView.h.

◆ ViewportToGlobal() [1/3]

Point pcl::ImageView::ViewportToGlobal ( const Point p) const
inline

Converts a point p in the viewport coordinate system to the global coordinate system. Returns a point with the resulting global coordinates.

Definition at line 1029 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ViewportToGlobal() [2/3]

Rect pcl::ImageView::ViewportToGlobal ( const Rect r) const
inline

Converts a rectangle r in the viewport coordinate system to the global coordinate system. Returns a rectangle with the resulting global coordinates.

Definition at line 1041 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ ViewportToGlobal() [3/3]

void pcl::ImageView::ViewportToGlobal ( int &  x,
int &  y 
) const

Converts the specified x and y integer coordinates from the viewport coordinate system to the global coordinate system.

The converted global coordinates are rounded to the nearest integers.

◆ ViewportToImage() [1/7]

template<typename T >
void pcl::ImageView::ViewportToImage ( Array< GenericPoint< T > > &  a) const
inline

Converts a set of points in a dynamic array from the viewport coordinate system to the image coordinate system.

Parameters
aReference to a dynamic array of points that will be converted from viewport coordinates to image coordinates.

Definition at line 837 of file ImageView.h.

◆ ViewportToImage() [2/7]

template<typename T >
DPoint pcl::ImageView::ViewportToImage ( const GenericPoint< T > &  p) const
inline

Converts a point p in the viewport coordinate system to the image coordinate system. Returns a point with the resulting floating point real image coordinates.

Definition at line 784 of file ImageView.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ViewportToImage() [3/7]

template<typename T >
DRect pcl::ImageView::ViewportToImage ( const GenericRectangle< T > &  r) const
inline

Converts a rectangle r in the viewport coordinate system to the image coordinate system. Returns a rectangle with the resulting floating point real image coordinates.

Definition at line 797 of file ImageView.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ ViewportToImage() [4/7]

void pcl::ImageView::ViewportToImage ( double &  x,
double &  y 
) const

Converts the specified x and y real floating point coordinates from the viewport coordinate system to the image coordinate system.

◆ ViewportToImage() [5/7]

void pcl::ImageView::ViewportToImage ( DPoint p,
size_type  n 
) const

Converts a set of real floating-point points from the viewport coordinate system to the image coordinate system.

Parameters
pPointer to the first point in the array of points that will be converted from viewport coordinates to image coordinates.
nNumber of points in the p array.

◆ ViewportToImage() [6/7]

void pcl::ImageView::ViewportToImage ( int &  x,
int &  y 
) const

Converts the specified x and y integer coordinates from the viewport coordinate system to the image coordinate system.

The converted image coordinates are rounded to the nearest integers.

◆ ViewportToImage() [7/7]

void pcl::ImageView::ViewportToImage ( Point p,
size_type  n 
) const

Converts a set of integer points from the viewport coordinate system to the image coordinate system.

Parameters
pPointer to the first point in the array of points that will be converted from viewport coordinates to image coordinates.
nNumber of points in the p array.

Converted point image coordinates are rounded to the nearest integers.

◆ ViewportUpdateRect()

Rect pcl::ImageView::ViewportUpdateRect ( ) const

Returns a rectangle in viewport coordinates that includes all pending viewport update regions for this ImageView control.

◆ ViewportWidth()

int pcl::ImageView::ViewportWidth ( ) const
inline

Gets the current width of the viewport in this ImageView control.

Definition at line 687 of file ImageView.h.

◆ VisibleViewportHeight()

int pcl::ImageView::VisibleViewportHeight ( ) const
inline

Returns the height in pixels of the current visible viewport region in this ImageView control.

Definition at line 759 of file ImageView.h.

◆ VisibleViewportRect()

Rect pcl::ImageView::VisibleViewportRect ( ) const

Gets the current visible viewport region in this ImageView control.

The returned rectangle corresponds to the visible region of the image in viewport coordinates. It depends on the current viewport zoom factor and on the positions of the viewport's scroll bars, if they are visible.

◆ VisibleViewportWidth()

int pcl::ImageView::VisibleViewportWidth ( ) const
inline

Returns the width in pixels of the current visible viewport region in this ImageView control.

Definition at line 750 of file ImageView.h.

◆ ZoomFactor()

int pcl::ImageView::ZoomFactor ( ) const

Returns the current zoom factor in the viewport of this ImageView control.

To learn how zoom factors are interpreted in PixInsight, see the documentation for SetViewport( double, double, int ).

◆ ZoomIn()

void pcl::ImageView::ZoomIn ( )
inline

Increments the current zoom factor for the viewport of this ImageView control.

To learn how zoom factors are interpreted in PixInsight, see the documentation for SetViewport( double, double, int ).

Definition at line 649 of file ImageView.h.

◆ ZoomOut()

void pcl::ImageView::ZoomOut ( )
inline

Decrements the current zoom factor for the viewport of this ImageView control.

To learn how zoom factors are interpreted in PixInsight, see the documentation for SetViewport( double, double, int ).

Definition at line 662 of file ImageView.h.


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