PCL
pcl::ImageWindow Class Reference

High-level interface to an image window object in the PixInsight core application. More...

#include <ImageWindow.h>

+ Inheritance diagram for pcl::ImageWindow:

Public Types

typedef BackgroundBrush::value_type background_brush
 
typedef DisplayChannel::value_type display_channel
 
typedef ImageMode::value_type gui_mode
 
typedef MaskMode::value_type mask_mode
 
typedef TransparencyMode::value_type transparency_mode
 

Public Member Functions

 ImageWindow ()=default
 
 ImageWindow (int width, int height, int numberOfChannels=1, int bitsPerSample=32, bool floatSample=true, bool color=false, bool initialProcessing=true, const IsoString &id=IsoString())
 
 ImageWindow (const ImageWindow &w)
 
 ImageWindow (ImageWindow &&x)
 
virtual ~ImageWindow ()
 
void BeginSelection (const Point &p, uint32 flags=0)
 
void BeginSelection (int x, int y, uint32 flags=0)
 
void BringToFront ()
 
void CancelSelection ()
 
void ClearAstrometricSolution (bool notify=true)
 
bool Close ()
 
void CommitPendingUpdates ()
 
View CreatePreview (const Rect &r, const IsoString &previewId=IsoString())
 
View CreatePreview (int x0, int y0, int x1, int y1, const IsoString &previewId=IsoString())
 
int CurrentAlphaChannel () const
 
display_channel CurrentChannel () const
 
View CurrentView () const
 
void Deiconize ()
 
void DeleteICCProfile ()
 
void DeletePreview (const IsoString &previewId)
 
void DeletePreviews ()
 
void DisableColorManagement (bool disable=true)
 
void DisableGamutCheck (bool disable=true)
 
void DisableMask (bool disable=true)
 
void DisableProofing (bool disable=true)
 
double DisplayPixelRatio () const
 
Bitmap DynamicCursorBitmap () const
 
Point DynamicCursorHotSpot () const
 
void EnableColorManagement (bool=true)
 
void EnableGamutCheck (bool=true)
 
void EnableMask (bool=true)
 
void EnableProofing (bool=true)
 
void EndSelection ()
 
ImageOptions FileInfo () const
 
String FilePath () const
 
String FileURL () const
 
void FitWindow ()
 
void ForceClose ()
 
bool GetICCProfile (ICCProfile &icc) const
 
bool GetKeywords (FITSKeywordArray &keywords) const
 
void GetResolution (double &xRes, double &yRes, bool &metric) const
 
void GetRGBWS (RGBColorSystem &rgbws) const
 
void GetSampleFormat (int &bitsPerSample, bool &floatSample) const
 
void GetViewportSize (int &width, int &height) const
 
void GlobalToViewport (int &x, int &y) const
 
Point GlobalToViewport (const Point &p) const
 
Rect GlobalToViewport (const Rect &r) const
 
bool HasAstrometricSolution () const
 
bool HasMaskReferences () const
 
bool HasPendingUpdates () const
 
bool HasPreviews () const
 
bool HasURL () const
 
void Hide ()
 
void HideMask (bool hide=true)
 
void HideTransparency ()
 
void Iconize ()
 
void ImageScalarToViewport (int *d, size_type n) const
 
void ImageScalarToViewport (double *d, size_type n) const
 
int ImageScalarToViewport (int) const
 
double ImageScalarToViewport (double) const
 
void ImageToViewport (int &x, int &y) const
 
void ImageToViewport (double &x, double &y) 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 (Point *p, size_type n) const
 
void ImageToViewport (DPoint *p, size_type n) const
 
template<typename T >
void ImageToViewport (Array< GenericPoint< T > > &a) const
 
void InvertMask (bool invert=true)
 
bool IsACopy () const
 
bool IsAlphaChannelDisplayed () const
 
bool IsColorManagementEnabled () const
 
bool IsGamutCheckEnabled () const
 
bool IsIconic () const
 
bool IsMaskCompatible (const ImageWindow &)
 
bool IsMaskEnabled () const
 
bool IsMaskInverted () const
 
bool IsMaskVisible () const
 
bool IsModified () const
 
bool IsNew () const
 
bool IsProofingEnabled () const
 
bool IsSelection () const
 
bool IsTransparencyVisible () const
 
bool IsValidView (const View &) const
 
bool IsVisible () const
 
FITSKeywordArray Keywords () const
 
View MainView () const
 
ImageWindow Mask () const
 
mask_mode MaskMode () const
 
size_type ModifyCount () const
 
void ModifyPreview (const IsoString &previewId, const Rect &r, const IsoString &newId=IsoString())
 
void ModifyPreview (const IsoString &previewId, int x0, int y0, int x1, int y1, const IsoString &newId=IsoString())
 
void ModifySelection (const Point &p, uint32 flags=0)
 
void ModifySelection (int x, int y, uint32 flags=0)
 
int NumberOfPreviews () const
 
ImageWindowoperator= (const ImageWindow &window)
 
ImageWindowoperator= (ImageWindow &&x)
 
View PreviewById (const IsoString &previewId) const
 
bool PreviewExists (const IsoString &previewId) const
 
Rect PreviewRect (const IsoString &previewId) const
 
Array< ViewPreviews () const
 
void PurgeProperties ()
 
void Regenerate ()
 
bool RegenerateAstrometricSolution (bool allowGUIMessages=true, bool notify=true)
 
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 RemoveMask ()
 
void RemoveMaskReferences ()
 
void Reset ()
 
void ResetDynamicCursor ()
 
void ResetKeywords ()
 
void SelectChannel (display_channel c)
 
View SelectedPreview () const
 
Rect SelectionRect (uint32 *flags=nullptr) const
 
void SelectMainView ()
 
void SelectPreview (View &)
 
void SelectPreview (const IsoString &previewId)
 
void SelectView (View &)
 
void SendToBack ()
 
void SetColorManagementFeatures (bool cmEnabled, bool proofing, bool gamutCheck)
 
void SetDynamicCursor (const char **xpm, int hx=0, int hy=0)
 
void SetDynamicCursor (const char **xpm, const Point &p)
 
void SetDynamicCursor (const Bitmap &bmp, int hx=0, int hy=0)
 
void SetDynamicCursor (const Bitmap &bmp, const Point &p)
 
void SetICCProfile (const ICCProfile &icc)
 
void SetICCProfile (const String &filePath)
 
void SetKeywords (const FITSKeywordArray &keywords)
 
void SetMask (ImageWindow &w, bool inverted=false)
 
void SetMaskMode (mask_mode mode)
 
void SetResolution (double xRes, double yRes, bool metric=false)
 
void SetResolution (double r, bool metric=false)
 
void SetRGBWS (const RGBColorSystem &rgbws)
 
void SetSampleFormat (int bitsPerSample, bool floatSample)
 
void SetTransparencyMode (transparency_mode mode, RGBA color=0)
 
void SetViewport (double cx, double cy, int zoom=0)
 
void SetViewport (const DPoint &center, int zoom=0)
 
void SetViewportPosition (int x, int y)
 
void SetViewportPosition (const Point &p)
 
void SetZoomFactor (int z)
 
void Show ()
 
void ShowMask (bool=true)
 
RGBA TransparencyColor () const
 
transparency_mode TransparencyMode () const
 
void UpdateAstrometryMetadata (bool notify=true)
 
void UpdateImageRect (const pcl::DRect &r)
 
void UpdateImageRect (double x0, double y0, double x1, double y1)
 
void UpdateMaskReferences ()
 
void UpdateSelection ()
 
void UpdateViewport ()
 
void UpdateViewportRect (const Rect &r)
 
void UpdateViewportRect (int x0, int y0, int x1, int y1)
 
void UseGlobalRGBWS ()
 
bool UsingGlobalRGBWS () const
 
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 (int *d, size_type n) const
 
void ViewportScalarToImage (double *d, size_type n) const
 
double ViewportScalarToImage (double d) const
 
template<typename T >
double ViewportScalarToImage (T d) const
 
void ViewportToGlobal (int &x, int &y) const
 
Point ViewportToGlobal (const Point &p) const
 
Rect ViewportToGlobal (const Rect &r) const
 
void ViewportToImage (int &x, int &y) const
 
void ViewportToImage (double &x, double &y) const
 
template<typename T >
DPoint ViewportToImage (const GenericPoint< T > &p) const
 
template<typename T >
DRect ViewportToImage (const GenericRectangle< T > &r) const
 
void ViewportToImage (Point *p, size_type n) const
 
void ViewportToImage (DPoint *p, size_type n) const
 
template<typename T >
void ViewportToImage (Array< GenericPoint< T > > &a) const
 
Rect ViewportUpdateRect () const
 
int ViewportWidth () const
 
int VisibleViewportHeight () const
 
Rect VisibleViewportRect () const
 
int VisibleViewportWidth () const
 
int ZoomFactor () const
 
void ZoomIn ()
 
void ZoomOut ()
 
void ZoomToFit (bool allowMagnification=true)
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
virtual void EnsureUnique ()
 
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)
 

Static Public Member Functions

static ProcessInterfaceActiveDynamicInterface ()
 
static ImageWindow ActiveWindow ()
 
static Array< ImageWindowAllWindows (bool includeIconicWindows=true)
 
static gui_mode CurrentMode ()
 
static int CursorTolerance ()
 
static background_brush GetBackgroundBrush (uint32 &fgColor, uint32 &bgColor)
 
static void GetDefaultResolution (double &xRes, double &yRes, bool &metric)
 
static void GetGlobalRGBWS (RGBColorSystem &rgbws)
 
static bool IsDefaultICCProfileEmbeddingEnabledForGrayscaleImages ()
 
static bool IsDefaultICCProfileEmbeddingEnabledForRGBImages ()
 
static bool IsDefaultPropertiesEmbeddingEnabled ()
 
static bool IsDefaultThumbnailEmbeddingEnabled ()
 
static bool IsDynamicSessionActive ()
 
static ImageWindowNull ()
 
static Array< ImageWindowOpen (const String &url, const IsoString &id=IsoString(), const IsoString &formatHints=IsoString(), bool asCopy=false, bool allowMessages=true)
 
static void SelectMode (gui_mode mode)
 
static void SetBackgroundBrush (background_brush brush, uint32 fgColor=0, uint32 bgColor=0)
 
static void SetGlobalRGBWS (const RGBColorSystem &rgbws)
 
static bool SetSwapDirectories (const StringList &directories)
 
static StringList SwapDirectories ()
 
static bool TerminateDynamicSession (bool closeInterface=true)
 
static ImageWindow WindowByFilePath (const String &filePath)
 
static ImageWindow WindowById (const IsoString &id)
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 

Additional Inherited Members

- 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 ImageWindow.

See also
View

Definition at line 280 of file ImageWindow.h.

Member Typedef Documentation

◆ background_brush

typedef BackgroundBrush::value_type pcl::ImageWindow::background_brush

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

Definition at line 309 of file ImageWindow.h.

◆ display_channel

typedef DisplayChannel::value_type pcl::ImageWindow::display_channel

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 295 of file ImageWindow.h.

◆ gui_mode

typedef ImageMode::value_type pcl::ImageWindow::gui_mode

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

Definition at line 288 of file ImageWindow.h.

◆ mask_mode

typedef MaskMode::value_type pcl::ImageWindow::mask_mode

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

Definition at line 302 of file ImageWindow.h.

◆ transparency_mode

typedef TransparencyMode::value_type pcl::ImageWindow::transparency_mode

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

Definition at line 316 of file ImageWindow.h.

Constructor & Destructor Documentation

◆ ImageWindow() [1/4]

pcl::ImageWindow::ImageWindow ( )
default

Constructs a null image window. A null ImageWindow does not correspond to an existing image window in the PixInsight core application.

◆ ImageWindow() [2/4]

pcl::ImageWindow::ImageWindow ( int  width,
int  height,
int  numberOfChannels = 1,
int  bitsPerSample = 32,
bool  floatSample = true,
bool  color = false,
bool  initialProcessing = true,
const IsoString id = IsoString() 
)

Creates a new image window with the specified image parameters.

Parameters
widthImage width in pixels. Must be >= 1. There is no specific upper limit.
heightImage height in pixels. Must be >= 1. There is no specific upper limit.
numberOfChannelsNumber of channels in the image. 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. This parameter is one by default.
bitsPerSampleNumber of bits per sample. Supported values are 8, 16 and 32 for integer images; 32 and 64 for floating point images. This parameter is 32 by default.
floatSampleTrue to create a floating point image; false to create an integer image. This parameter is true by default.
colorTrue to create a RGB color image; false to create a grayscale image. This parameter is false by default.
initialProcessingTrue if the core application should assign a ProcessContainer instance to hold the initial processing for this image. The initial processing items will be automatically generated by the core application as a function of the current processing thread context. This parameter is true by default.
idIdentifier for the new image. If an empty string is specified, the core application will assign an automatically generated identifier. If the specified identifier is not unique, the core application will make it unique by appending an automatically generated suffix. This parameter is an empty string by default.

The newly created image is initialized with zero pixel sample values (black pixels). This includes all nominal and alpha channels.

The new image window will be hidden. To make it visible on the core application, you must call its Show() member function explicitly.

◆ ImageWindow() [3/4]

pcl::ImageWindow::ImageWindow ( const ImageWindow w)
inline

Copy constructor. Constructs an ImageWindow object as an alias of an existing ImageWindow object.

It cannot be overemphasized that this constructor does not create a new image window in the PixInsight core application. It only creates an alias object for an existing image window in the calling module. In all respects, the alias and aliased objects are completely interchangeable; their behaviors are exactly identical since they refer to the same server-side object.

Definition at line 393 of file ImageWindow.h.

◆ ImageWindow() [4/4]

pcl::ImageWindow::ImageWindow ( ImageWindow &&  x)
inline

Move constructor.

Definition at line 400 of file ImageWindow.h.

◆ ~ImageWindow()

virtual pcl::ImageWindow::~ImageWindow ( )
inlinevirtual

Destroys this ImageWindow object.

This destructor does not destroy the actual image window object, which is part of the PixInsight core application. Only the managed alias object living in the calling module is destroyed.

Definition at line 411 of file ImageWindow.h.

Member Function Documentation

◆ ActiveDynamicInterface()

static ProcessInterface* pcl::ImageWindow::ActiveDynamicInterface ( )
static

Returns a pointer to the current active dynamic interface.

The active dynamic interface is the interface that has been activated in dynamic mode.

Warning
Note that the returned pointer could point to an object that has not been created by the calling module; this is what we call a foreign object in the PixInsight/PCL framework. If a pointer to a foreign interface is returned by this function, the calling module cannot use that pointer to access the foreign object in any way, since direct intermodule communication is not supported in the current PixInsight/PCL framework.

◆ ActiveWindow()

static ImageWindow pcl::ImageWindow::ActiveWindow ( )
static

Returns the current active image window. Returns ImageWindow::Null() if there are no image windows, if all image windows are hidden, or if all image windows have been iconized.

The active image window is the topmost image window of the stack of image windows in the current workspace. Most commands that apply to views, images and previews, are executed on the active image window by default, even if it doesn't have the keyboard focus.

◆ AllWindows()

static Array<ImageWindow> pcl::ImageWindow::AllWindows ( bool  includeIconicWindows = true)
static

Returns a container with all existing image windows, including visible and hidden windows, and optionally iconized windows.

Parameters
includeIconicWindowsIf this parameter is false, iconic image windows will not be included in the returned container.

◆ BeginSelection() [1/2]

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

Begins a new interactive rectangular selection procedure on the viewport of this image window.

Calling this function is equivalent to:

BeginSelection( p.x, p.y, flags );

Definition at line 2728 of file ImageWindow.h.

◆ BeginSelection() [2/2]

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

Starts a new interactive rectangular selection procedure on the viewport of this image window.

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.

Dynamic interfaces 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.

◆ BringToFront()

void pcl::ImageWindow::BringToFront ( )

Brings this image window to the top of the stack of image windows in its parent workspace of the PixInsight core application's GUI.

Calling this function implicitly shows this image window, if it was previously hidden or iconized. If this window is a child of the current workspace, calling this function also activates it and gives it the keyboard focus.

◆ CancelSelection()

void pcl::ImageWindow::CancelSelection ( )

Aborts the current interactive selection procedure.

◆ Close()

bool pcl::ImageWindow::Close ( )

Requests closing this image window. Returns true if the window was actually closed.

When an image window is closed, its image and all of its numerous associated resources are destroyed. The close operation is irreversible in PixInsight.

If the image in this window is not modified, the window will be closed and true will be returned.

If the image in this window is modified and has not been saved to a disk file, the PixInsight core application will ask the user if it is ok to throw away the changes by closing this window. If the user answers affirmatively, the window will be closed and this function will return true. If the user says no, the window will not be closed and the function will return false.

See also
ForceClose()

◆ CommitPendingUpdates()

void pcl::ImageWindow::CommitPendingUpdates ( )

Executes all pending viewport update requests for this image window.

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.

◆ CreatePreview() [1/2]

View pcl::ImageWindow::CreatePreview ( const Rect r,
const IsoString previewId = IsoString() 
)
inline

Creates a new preview in this image window. Returns the newly created preview as a View object.

Calling this function is equivalent to:

CreatePreview( r.x0, r.y0, r.x1, r.y1, previewId );

Definition at line 773 of file ImageWindow.h.

◆ CreatePreview() [2/2]

View pcl::ImageWindow::CreatePreview ( int  x0,
int  y0,
int  x1,
int  y1,
const IsoString previewId = IsoString() 
)

Creates a new preview in this image window. Returns the newly created preview as a View object.

Parameters
x0,y0Position (horizontal, vertical) of the left-top corner of the preview rectangle in image coordinates.
x1,y1Position (horizontal, vertical) of the right-bottom corner of the preview rectangle in image coordinates.
previewIdPreview identifier. If an empty string is specified, the core application will generate an automatic identifier for the newly created preview. If the specified identifier is already in use, the core application will make it unique by appending an automatically generated suffix.

The preview rectangle must define a non-empty rectangular area completely included in the boundaries of the image in this window.

◆ CurrentAlphaChannel()

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

Returns the alpha channel index displayed for the image in the current view. 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 1606 of file ImageWindow.h.

◆ CurrentChannel()

display_channel pcl::ImageWindow::CurrentChannel ( ) const

Returns the current display channel in the core application's GUI.

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

◆ CurrentMode()

static gui_mode pcl::ImageWindow::CurrentMode ( )
static

Returns the current GUI working mode in the PixInsight core application.

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

◆ CurrentView()

View pcl::ImageWindow::CurrentView ( ) const

Returns the current view of this image window.

The current view is the view currently selected for direct user interaction in the core application GUI for this image window. The current view receives cursor and pointing device (mouse) events.

◆ CursorTolerance()

static int pcl::ImageWindow::CursorTolerance ( )
static

Returns the current cursor tolerance in viewport coordinates, as globally established in the PixInsight core application.

This value is the threshold distance in pixels, in viewport coordinates, used to activate actions based on object proximity.

For example, if an interface implements an interactive procedure for resizing a rectangle based on mouse movement events, when the mouse cursor gets closer to a given side of the rectangle by less than the current cursor tolerance, the cursor shape should be changed to give feedback to the user; e.g. to a double arrow shape corresponding to the side being resized.

◆ Deiconize()

void pcl::ImageWindow::Deiconize ( )

Deiconizes this image window, if it was previously iconized.

◆ DeleteICCProfile()

void pcl::ImageWindow::DeleteICCProfile ( )

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

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

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

◆ DeletePreview()

void pcl::ImageWindow::DeletePreview ( const IsoString previewId)

Destroys an existing preview in this window and frees all of its associated view resources.

Parameters
previewIdIdentifier of the preview that will be destroyed.

The PixInsight core application might ask the user for permission before attempting to destroy a preview in an image window.

◆ DeletePreviews()

void pcl::ImageWindow::DeletePreviews ( )

Destroys all previews in this image window.

The PixInsight core application reserves the right to ask the user for permission before attempting to destroy all previews in an image window.

◆ DisableColorManagement()

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

Disables color management for this image window.

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

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

Definition at line 1138 of file ImageWindow.h.

◆ DisableGamutCheck()

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

Disables the gamut check proofing feature for this image window.

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

If this image window is visible, has color management enabled, and has 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 1210 of file ImageWindow.h.

◆ DisableMask()

void pcl::ImageWindow::DisableMask ( bool  disable = true)
inline

Disables the mask of this image window.

Definition at line 985 of file ImageWindow.h.

◆ DisableProofing()

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

Disables soft-proofing for this image window.

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

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

Definition at line 1173 of file ImageWindow.h.

◆ DisplayPixelRatio()

double pcl::ImageWindow::DisplayPixelRatio ( ) const

Returns the ratio between physical screen pixels and device-independent coordinate units for this image window (actually, for the workspace that this window belongs to).

The returned value is greater than or equal to one. Typical pixel ratios are 2.0 for high-dpi displays such as Retina monitors, or 1.0 for normal 96 dpi monitors.

The display pixel ratio is never used by ImageWindow, since all viewport coordinates are always specified in physical display pixels. However, knowing this ratio is useful to properly scale interactive graphical contents generated by dynamic processes. For example, drawing vector graphics with one-pixel wide pens is fine for normal monitors, but may cause visibility problems on a 4K monitor, and is clearly inappropriate on a 5K monitor.

The following example shows how to scale a Pen's width to adapt a drawing to the physical display where the window is being shown to the user:

void MyStrokePolygon( VectorGraphics& G,
const Array<DPoint>& points, RGBA color,
const ImageWindow& window )
{
G.StrokePolygon( points, Pen( color, window.DisplayPixelRatio() ) );
}

◆ DynamicCursorBitmap()

Bitmap pcl::ImageWindow::DynamicCursorBitmap ( ) const

Returns a RGBA bitmap as a copy of the current shape of the pointing device's cursor for the active dynamic session.

◆ DynamicCursorHotSpot()

Point pcl::ImageWindow::DynamicCursorHotSpot ( ) const

Returns the cursor hot spot position for the active dynamic session.

Cursor hot spot coordinates are relative to the left-top corner of the cursor shape bitmap.

◆ EnableColorManagement()

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

Enables color management for this image window.

Color management uses ICC profiles for this image (either a profile associated with this image or a global profile) and the monitor device to control how this 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 this 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 image window is visible, its screen rendition is updated immediately after calling this function.

◆ EnableGamutCheck()

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

Enables the gamut check proofing feature for this image window.

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 image window is visible, has color management enabled, and has proofing enabled, its screen rendition is updated immediately after calling this function. If color proofing is disabled, calling this function has no effect.

◆ EnableMask()

void pcl::ImageWindow::EnableMask ( bool  = true)

Enables the mask of this image window.

◆ EnableProofing()

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

Enables soft-proofing for this image window.

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 image window is visible and has color management enabled, its screen rendition is updated immediately after calling this function.

◆ EndSelection()

void pcl::ImageWindow::EndSelection ( )

Terminates the current interactive selection procedure.

◆ FileInfo()

ImageOptions pcl::ImageWindow::FileInfo ( ) const

Returns an ImageOptions structure with information about the image in this image window.

◆ FilePath()

String pcl::ImageWindow::FilePath ( ) const

Returns the full file path to the image file loaded in this image window, or an empty string if this window holds is a new image.

Note
When an image has been loaded from a remote location (by specifying a valid URL in a call to ImageWindow::Open(), for example), the returned path corresponds to the file that has been downloaded to the local filesystem upon window creation, not to the original URL.

◆ FileURL()

String pcl::ImageWindow::FileURL ( ) const

Returns the URL of the remote resource from which this image has been downloaded, or an empty string if this window has not been downloaded from a remote location.

◆ FitWindow()

void pcl::ImageWindow::FitWindow ( )

Adjusts this image window to the minimum size required to show the entire image at the current zoom factor or, if that cannot be achieved, to show the maximum possible portion of the image without exceeding the visible area of its parent workspace in the core application's GUI.

This function will move the window on its parent workspace only if it is strictly necessary.

◆ ForceClose()

void pcl::ImageWindow::ForceClose ( )

Closes this image window unconditionally. The window will be closed immediately without asking questions, irrespective of whether the image or its associated metadata have been modified.

See also
Close()

◆ GetBackgroundBrush()

static background_brush pcl::ImageWindow::GetBackgroundBrush ( uint32 fgColor,
uint32 bgColor 
)
static

Returns the current transparency background brush and its foreground and background colors in the core application's GUI.

Parameters
[out]fgColorThe foreground color of the background brush.
[out]bgColorThe background color of the background brush.

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

The obtained colors are AARRGGBB values. The alpha values are always 0xff, since the background brush cannot be transparent.

In PixInsight, pixel opacity is defined by the first alpha channel of the image: a pixel is opaque if the corresponding alpha channel value is white; a pixel is completely transparent if the corresponding alpha value is black. Intermediate alpha values define semitransparent pixels.

The background brush is a two-color brush used to render transparent regions of images. It is a global object used for all images in the PixInsight core application.

◆ GetDefaultResolution()

static void pcl::ImageWindow::GetDefaultResolution ( double &  xRes,
double &  yRes,
bool &  metric 
)
static

Gets the current default image resolution parameters.

Parameters
[out]xResReference to a variable where the default horizontal resolution will be stored.
[out]yResReference to a variable where the default vertical resolution will be stored.
[out]metricReference to a variable whose stored value will indicate the current default resolution units. If this variable is true, default resolution is expressed in pixels per centimeter; if it is false, resolution is expressed in pixels per inch.

Resolution is expressed in pixels per resolution unit (centimeter if metric is true; inch if metric is false).

Default resolution parameters are applied to all newly created images in the PixInsight core application.

◆ GetGlobalRGBWS()

static void pcl::ImageWindow::GetGlobalRGBWS ( RGBColorSystem rgbws)
static

Obtains a copy of the current global RGB working space (RGBWS) in the PixInsight core application.

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

The global RGBWS is the default RGBWS that is associated with newly created image windows (both as new images and when images are loaded from disk files). Global RGBWS parameters can be modified by the user through the standard RGBWorkingSpace process in the core application.

◆ GetICCProfile()

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

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

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

◆ GetKeywords()

bool pcl::ImageWindow::GetKeywords ( FITSKeywordArray keywords) const
inline

Obtains a copy of the FITS header keywords currently defined for the image in this window. Returns true if this image has FITS keywords.

Parameters
[out]keywordsReference to a container that will receive a copy of the FITS keywords defined in this image.
Deprecated:
This member function has been deprecated. It is left only to keep existing code working. Use Keywords() in newly produced code.

Definition at line 1295 of file ImageWindow.h.

◆ GetResolution()

void pcl::ImageWindow::GetResolution ( double &  xRes,
double &  yRes,
bool &  metric 
) const

Gets the current image resolution parameters in this image window.

Parameters
[out]xResReference to a variable where the horizontal resolution will be stored.
[out]yResReference to a variable where the vertical resolution will be stored.
[out]metricReference to a variable whose stored value will indicate the current resolution units in this image window. If this variable is true, resolution is expressed in pixels per centimeter; if it is false, resolution is expressed in pixels per inch.

Resolution is expressed in pixels per resolution unit (centimeter if metric is true; inch if metric is false).

◆ GetRGBWS()

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

Obtains a copy of the RGB working space (RGBWS) associated with this image window.

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

◆ GetSampleFormat()

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

Retrieves the pixel sample data format used by the image in this window.

Parameters
[out]bitsPerSampleOn output, will be equal to the number of bits per sample in the image in this window. 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 in this window uses floating point samples; false if it uses integer samples.

◆ GetViewportSize()

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

Gets the current sizes of the viewport in this image window.

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 image window, 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 image window.

◆ GlobalToViewport() [1/3]

void pcl::ImageWindow::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.

◆ GlobalToViewport() [2/3]

Point pcl::ImageWindow::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 2492 of file ImageWindow.h.

◆ GlobalToViewport() [3/3]

Rect pcl::ImageWindow::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 2504 of file ImageWindow.h.

◆ HasMaskReferences()

bool pcl::ImageWindow::HasMaskReferences ( ) const

Returns true iff this image window is acting as a mask for other image window(s).

◆ HasPendingUpdates()

bool pcl::ImageWindow::HasPendingUpdates ( ) const

Returns true iff there are pending viewport updates for this image window.

◆ HasPreviews()

bool pcl::ImageWindow::HasPreviews ( ) const
inline

Returns true iff there are one or more previews currently defined in this image window.

Definition at line 689 of file ImageWindow.h.

◆ HasURL()

bool pcl::ImageWindow::HasURL ( ) const
inline

Returns true iff this image has been downloaded from a remote location, in which case the source URL can be obtained by calling FileURL().

Definition at line 581 of file ImageWindow.h.

References pcl::GenericString< T, R, A >::IsEmpty().

◆ Hide()

void pcl::ImageWindow::Hide ( )

Hides this image window, if it was previously visible.

◆ HideMask()

void pcl::ImageWindow::HideMask ( bool  hide = true)
inline

Hides the mask of this image window, i.e. disables mask visibility.

Definition at line 1003 of file ImageWindow.h.

◆ HideTransparency()

void pcl::ImageWindow::HideTransparency ( )
inline

Disables transparency renditions for this image window.

Calling this function is equivalent to:

SetTransparencyMode( pcl::TransparencyMode::Hide );

Definition at line 1743 of file ImageWindow.h.

◆ Iconize()

void pcl::ImageWindow::Iconize ( )

Iconizes this image window.

◆ ImageScalarToViewport() [1/4]

void pcl::ImageWindow::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() [2/4]

void pcl::ImageWindow::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() [3/4]

int pcl::ImageWindow::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.

◆ ImageScalarToViewport() [4/4]

double pcl::ImageWindow::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.

◆ ImageToViewport() [1/7]

void pcl::ImageWindow::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() [2/7]

void pcl::ImageWindow::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() [3/7]

template<typename T >
GenericPoint<T> pcl::ImageWindow::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 2341 of file ImageWindow.h.

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

◆ ImageToViewport() [4/7]

template<typename T >
GenericRectangle<T> pcl::ImageWindow::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 2358 of file ImageWindow.h.

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

◆ ImageToViewport() [5/7]

void pcl::ImageWindow::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.

◆ ImageToViewport() [6/7]

void pcl::ImageWindow::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() [7/7]

template<typename T >
void pcl::ImageWindow::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 2398 of file ImageWindow.h.

◆ InvertMask()

void pcl::ImageWindow::InvertMask ( bool  invert = true)
inline

Activates or deactivates mask inversion for this image window.

Definition at line 966 of file ImageWindow.h.

◆ IsACopy()

bool pcl::ImageWindow::IsACopy ( ) const

Returns true iff the image in this window has been loaded from a file as a copy.

The File > Save command (and all related menu items) is always disabled for images loaded as copies in the PixInsight core application. This means that the only way to write an image copy is the File > Save As command. This is a security enhancement to avoid File > Save accidents, e.g. by pressing Ctrl+S inattentively. The same applies to the save command-line internal command, which requires an explicit file path specification for image copies.

◆ IsAlphaChannelDisplayed()

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

Returns true iff the current display channel (in the core application) corresponds to an alpha channel of the image in the current view.

Definition at line 1592 of file ImageWindow.h.

◆ IsColorManagementEnabled()

bool pcl::ImageWindow::IsColorManagementEnabled ( ) const

Returns true iff color management is active for this image window.

◆ IsDefaultICCProfileEmbeddingEnabledForGrayscaleImages()

static bool pcl::ImageWindow::IsDefaultICCProfileEmbeddingEnabledForGrayscaleImages ( )
static

Returns true iff default ICC profile embedding is globally enabled for grayscale images in the PixInsight core application.

Modules implementing file format support may call this function to provide coherent default states for ICC profile embedding selectable options in their interfaces; e.g. "Embed ICC Profile" check boxes on format options dialogs presented to the user during file write operations. However, the PixInsight core application always provides coherent default states for all embedding flags to all modules, so this function is not frequently used.

◆ IsDefaultICCProfileEmbeddingEnabledForRGBImages()

static bool pcl::ImageWindow::IsDefaultICCProfileEmbeddingEnabledForRGBImages ( )
static

Returns true iff default ICC profile embedding is globally enabled for RGB images in the PixInsight core application.

Modules implementing file format support may call this function to provide coherent default states for ICC profile embedding selectable options in their interfaces; e.g. "Embed ICC Profile" check boxes on format options dialogs presented to the user during file write operations. However, the PixInsight core application always provides coherent default states for all embedding flags to all modules, so this function is not frequently used.

◆ IsDefaultPropertiesEmbeddingEnabled()

static bool pcl::ImageWindow::IsDefaultPropertiesEmbeddingEnabled ( )
static

Returns true iff default properties embedding is globally enabled in the PixInsight core application.

Modules implementing file formats should call this function to provide coherent default states for properties embedding selectable options in their interfaces; e.g. "Embed Properties" check boxes on dialogs presented to the user to gather file and format-specific options during file write operations.

◆ IsDefaultThumbnailEmbeddingEnabled()

static bool pcl::ImageWindow::IsDefaultThumbnailEmbeddingEnabled ( )
static

Returns true iff default thumbnail embedding is globally enabled in the PixInsight core application.

Modules implementing file formats should call this function to provide coherent default states for thumbnail embedding selectable options in their interfaces; e.g. "Embed Thumbnail" check boxes on dialogs presented to the user to gather file and format-specific options during file write operations.

◆ IsDynamicSessionActive()

static bool pcl::ImageWindow::IsDynamicSessionActive ( )
static

Returns true iff a dynamic session is currently active in the core PixInsight application.

A dynamic session is active if there is a processing interface working in dynamic mode, and one or more views have been selected by the active dynamic interface as dynamic targets.

◆ IsGamutCheckEnabled()

bool pcl::ImageWindow::IsGamutCheckEnabled ( ) const

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

◆ IsIconic()

bool pcl::ImageWindow::IsIconic ( ) const

Returns true iff this image window is iconic.

◆ IsMaskCompatible()

bool pcl::ImageWindow::IsMaskCompatible ( const ImageWindow )

Returns true iff a specified image window could be selected as a mask for this image window.

For a given image M to be a valid mask for an image I:

  • Both I and M must have identical dimensions.
  • If I is a RGB color image, M can be either a grayscale image or a RGB color image.
  • If I is a grayscale image, M must be also a grayscale image.

◆ IsMaskEnabled()

bool pcl::ImageWindow::IsMaskEnabled ( ) const

Returns true iff the mask is current enabled for this image window.

◆ IsMaskInverted()

bool pcl::ImageWindow::IsMaskInverted ( ) const

Returns true iff mask inversion is currently active for this image window.

◆ IsMaskVisible()

bool pcl::ImageWindow::IsMaskVisible ( ) const

Returns true iff the mask is currently visible for this image window.

◆ IsModified()

bool pcl::ImageWindow::IsModified ( ) const
inline

Returns true iff the image in this image window has been modified and is unsaved. An image is modified if its modification counter is not zero.

Definition at line 603 of file ImageWindow.h.

◆ IsNew()

bool pcl::ImageWindow::IsNew ( ) const

Returns true iff the image in this window has not been loaded from a disk file, but created as a new image in the core application (e.g., by the NewImage standard process).

◆ IsProofingEnabled()

bool pcl::ImageWindow::IsProofingEnabled ( ) const

Returns true iff soft-proofing is currently enabled for this image window.

◆ IsSelection()

bool pcl::ImageWindow::IsSelection ( ) const

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

◆ IsTransparencyVisible()

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

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

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

Definition at line 1717 of file ImageWindow.h.

◆ IsValidView()

bool pcl::ImageWindow::IsValidView ( const View ) const

Returns true iff the specified view is a view of this image window, that is, either the main view of this image window, or one of its previews.

◆ IsVisible()

bool pcl::ImageWindow::IsVisible ( ) const

Returns true iff this image window is currently visible.

◆ Keywords()

FITSKeywordArray pcl::ImageWindow::Keywords ( ) const

Returns a copy of the FITS header keywords currently defined for the image in this window. Returns an empty array if this image has no FITS keywords.

◆ MainView()

View pcl::ImageWindow::MainView ( ) const

Returns the main view of this image window.

The main view holds the entire image of this window. There is only one main view in an image window.

◆ Mask()

ImageWindow pcl::ImageWindow::Mask ( ) const

Returns the image window that is currently acting as a mask for this window, or ImageWindow::Null() if this window has no assigned mask.

◆ MaskMode()

mask_mode pcl::ImageWindow::MaskMode ( ) const

Returns the current mask rendering mode for this image window.

Supported mask rendering modes are defined in the MaskMode namespace.

◆ ModifyCount()

size_type pcl::ImageWindow::ModifyCount ( ) const

Returns the modification counter for this image window. The modification counter contains the amount of changes made to the image since it was created, loaded from a disk file, or saved to a disk file.

◆ ModifyPreview() [1/2]

void pcl::ImageWindow::ModifyPreview ( const IsoString previewId,
const Rect r,
const IsoString newId = IsoString() 
)
inline

Modifies the identifier and rectangular area properties of an existing preview.

Calling this function is equivalent to:

ModifyPreview( previewId, r.x0, r.y0, r.x1, r.y1 );

Definition at line 817 of file ImageWindow.h.

◆ ModifyPreview() [2/2]

void pcl::ImageWindow::ModifyPreview ( const IsoString previewId,
int  x0,
int  y0,
int  x1,
int  y1,
const IsoString newId = IsoString() 
)

Modifies the identifier and rectangular area properties of an existing preview.

Parameters
previewIdIdentifier of a preview whose properties will be modified.
x0,y0Position (horizontal, vertical) of the left-top corner of the new preview rectangle in image coordinates.
x1,y1Position (horizontal, vertical) of the right-bottom corner of the new preview rectangle in image coordinates.
newIdNew preview identifier. If an empty string is specified, this function will not modify the current preview identifier. If the specified identifier is already in use in this window, the core application will make it unique by appending an automatically generated suffix.

The preview rectangle must define a rectangular area of at least one pixel, completely included in the boundaries of the image in this window.

◆ ModifySelection() [1/2]

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

Updates an ongoing interactive rectangular selection procedure on the viewport of this image window.

Calling this function is equivalent to:

ModifySelection( p.x, p.y, flags );

Definition at line 2759 of file ImageWindow.h.

◆ ModifySelection() [2/2]

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

Updates an ongoing interactive rectangular selection procedure on the viewport of this image window.

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.

◆ Null()

static ImageWindow& pcl::ImageWindow::Null ( )
static

Returns a reference to a null ImageWindow instance. A null ImageWindow does not correspond to an existing image window in the PixInsight core application.

◆ NumberOfPreviews()

int pcl::ImageWindow::NumberOfPreviews ( ) const

Returns the number of previews currently defined in this image window.

◆ Open()

static Array<ImageWindow> pcl::ImageWindow::Open ( const String url,
const IsoString id = IsoString(),
const IsoString formatHints = IsoString(),
bool  asCopy = false,
bool  allowMessages = true 
)
static

Opens an image file and loads one or more images into new image windows.

Parameters
urlA path specification or URL that points to an image file to be loaded by the PixInsight core application. The file name must include a file extension, since it is the only way to select a file format, necessary to read and decode images.
idIdentifier for the new image(s). If an empty string is specified, the application will assign an automatically generated identifier. If the specified identifier is not unique, the application will make it unique by appending an automatically generated suffix. This parameter is an empty string by default.
formatHintsA string of format hints that will be sent to the file format instance created to load the image. Format hints are useful to modify the behavior of a file format suuport module lo load a specific image, overriding global preferences and format settings. See the FileFormatInstance::Open() member function for more information on format hints. This parameter is an empty string by default.
asCopyTrue to open the images as copies. The File > Save command (and all related menu items) is always disabled for images loaded as copies in the PixInsight core application. This means that the only way to write an image copy is the File > Save As command. This is a security enhancement to avoid File > Save accidents, e.g. by pressing Ctrl+S inattentively. The same applies to the save internal command-line command, which requires an explicit file path specification for image copies. This parameter is false by default.
allowMessagesTrue to allow the core application to show warning message boxes (e.g., to inform about inexact read operations) and color management dialog boxes (upon ICC profile mismatches or missing ICC profiles). If this parameter is false, no dialog box or warning message box will be shown, and default actions will be taken as appropriate for conflicting ICC profiles. However, all warning messages will be sent to the processing console when this parameter is false. Error messages will always be shown. This parameter is true by default.

The PixInsight core application will find and select a file format to read the specified image file, among the installed file format modules. Format selection is exclusively a function of the specified file extension (e.g., .fit will select the FITS format, .tif the TIFF format, .jpg for JPEG, and so on).

File and directory paths in the PixInsight environment employ UNIX directory separators (the slash character, '/') on all supported platforms. As an exception, on Windows PCL allows you to use also DOS separators (backslash, '\'), but their use is discouraged since its support might be discontinued in future PCL versions.

URLs must be valid and conform to the URI specification from RFC 3986 (Uniform Resource Identifier: Generic Syntax). At least the file, HTTP, HTTPS, FTP and FTPS protocols are supported. More protocols may be available, depending on PixInsight core versions.

Returns an array of ImageWindow objects. Each object in the array corresponds to an image loaded into a new image window from the specified file. In general, the returned array will contain only one object, since most image file formats can store just a single image. For formats that can store multiple images, more than one ImageWindow can be created as a result of opening a single file.

Newly created image windows will be hidden. To make them visible on the core application's workspace, you must call their ImageWindow::Show() member function explicitly.

◆ operator=() [1/2]

ImageWindow& pcl::ImageWindow::operator= ( const ImageWindow window)
inline

Copy assignment operator. Detaches this object from its previously referenced server-side image window and makes it an alias of the specified window. Returns a reference to this object.

When this operator is used, the calling object is detached from the previously referenced window. Note that an image window cannot be destroyed when it becomes unreferenced, as it is an internal UI object that belongs to the core application, not to the calling module, even if the window has been created by the calling module.

Definition at line 426 of file ImageWindow.h.

◆ operator=() [2/2]

ImageWindow& pcl::ImageWindow::operator= ( ImageWindow &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 435 of file ImageWindow.h.

◆ PreviewById()

View pcl::ImageWindow::PreviewById ( const IsoString previewId) const

Finds a preview by its identifier. If the specified previewId identifier corresponds to an existing preview in this image window, it is returned as a View object. If no preview in this image window has the specified previewId identifier, or if this window has no previews, this function returns an alias of View::Null().

◆ PreviewExists()

bool pcl::ImageWindow::PreviewExists ( const IsoString previewId) const
inline

Returns true if a preview with the specified previewId identifier is currently defined in this image window; false if no preview with such identifier exists in this window, or if this window has no previews.

Definition at line 720 of file ImageWindow.h.

References pcl::UIObject::IsNull().

◆ PreviewRect()

Rect pcl::ImageWindow::PreviewRect ( const IsoString previewId) const

Returns the rectangular area in image coordinates of a preview with the specified previewId identifier.

If no preview is defined in this window with the specified identifier, this function returns an empty rectangle.

◆ Previews()

Array<View> pcl::ImageWindow::Previews ( ) const

Returns a dynamic array of View objects corresponding to the previews currently defined in this image window. If this window has no previews, an empty array is returned.

◆ PurgeProperties()

void pcl::ImageWindow::PurgeProperties ( )

Destroys all existing properties for all views in this image window.

◆ Regenerate()

void pcl::ImageWindow::Regenerate ( )

Regenerates the screen rendition for the visible viewport region in this image window. This includes regeneration of screen renditions depending on active dynamic interfaces.

◆ RegenerateImageRect() [1/2]

void pcl::ImageWindow::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 );

Definition at line 2569 of file ImageWindow.h.

◆ RegenerateImageRect() [2/2]

void pcl::ImageWindow::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::ImageWindow::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 );

Definition at line 2540 of file ImageWindow.h.

◆ RegenerateViewportRect() [2/2]

void pcl::ImageWindow::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.

◆ RemoveMask()

void pcl::ImageWindow::RemoveMask ( )
inline

Removes the current mask selection of this image window.

Definition at line 953 of file ImageWindow.h.

◆ RemoveMaskReferences()

void pcl::ImageWindow::RemoveMaskReferences ( )

Removes all mask references for this image window.

All images that were masked by this window will be unmasked after calling this function. Use it with great care, since removing masking relations without direct user intervention is potentially dangerous.

◆ Reset()

void pcl::ImageWindow::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 in the current view of this image window.

Definition at line 2520 of file ImageWindow.h.

◆ ResetDynamicCursor()

void pcl::ImageWindow::ResetDynamicCursor ( )
inline

Restores the default shape of the pointing device's cursor for the active dynamic session.

Definition at line 2144 of file ImageWindow.h.

References pcl::Bitmap::Null().

◆ ResetKeywords()

void pcl::ImageWindow::ResetKeywords ( )

Deletes all existing FITS header keywords in this image window.

◆ SelectChannel()

void pcl::ImageWindow::SelectChannel ( display_channel  c)

Selects the current display channel in the core application's GUI.

Parameters
cSpecifies the new display channel. Supported display channels are identified through symbolic constants defined 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.

◆ SelectedPreview()

View pcl::ImageWindow::SelectedPreview ( ) const

Returns the currently selected preview, or an alias of View::Null() if no preview is currently selected in this image window.

Note
The selected preview in an image window has nothing to do with the current view in the same image window. The selected preview corresponds to a selection on the main view of the window, used to resize and move preview rectangles, and also to perform preview actions (undo/redo, reset, store, restore, etc) without needing to select a preview as the window's current view.

◆ SelectionRect()

Rect pcl::ImageWindow::SelectionRect ( uint32 flags = nullptr) const

Returns the current rectangular selection in image coordinates.

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

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

◆ SelectMainView()

void pcl::ImageWindow::SelectMainView ( )
inline

Selects the main view as the current view in this image window.

Definition at line 664 of file ImageWindow.h.

◆ SelectMode()

static void pcl::ImageWindow::SelectMode ( gui_mode  mode)
static

Sets the current GUI working mode in the PixInsight core application.

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

Not all GUI modes are valid in all contexts. For example, if the current view is a preview, the New Preview mode cannot be selected. If the specified mode is not currently valid, this function is simply ignored.

◆ SelectPreview() [1/2]

void pcl::ImageWindow::SelectPreview ( View )

Causes this window to select the specified view as its selected preview. Refer to the SelectedPreview() function for further information on the concept of selected preview.

◆ SelectPreview() [2/2]

void pcl::ImageWindow::SelectPreview ( const IsoString previewId)
inline

Causes this window to select the view with the specified identifier as its current selected preview. Refer to the SelectedPreview() function for further information on the concept of selected preview.

Definition at line 755 of file ImageWindow.h.

◆ SelectView()

void pcl::ImageWindow::SelectView ( View )

Selects the specified view as the current view in this image window.

◆ SendToBack()

void pcl::ImageWindow::SendToBack ( )

Pushes this image window to the bottom of the stack of image windows in its parent workspace of the PixInsight core application's GUI.

If this is the only visible image window in its parent workspace, calling this function has no effect. If there are more visible image windows in the parent workspace and it is the current workspace, calling this function implicitly deactivates this image window and gives the keyboard focus to the new topmost image window in the window stack.

◆ SetBackgroundBrush()

static void pcl::ImageWindow::SetBackgroundBrush ( background_brush  brush,
uint32  fgColor = 0,
uint32  bgColor = 0 
)
static

Sets the transparency background brush in the core application's GUI.

Parameters
brushSpecifies the new background brush that will be used to render transparent regions of images. Supported background brushes are identified through symbolic constants defined in the BackgroundBrush namespace.
fgColorNew foreground color for the background brush. If zero is specified (the default value), the current foreground color will not be changed.
bgColorNew background color for the background brush. If zero is specified (the default value), the current background color will not be changed.

For a definition of background brushes and their meaning in PixInsight, see the documentation of GetBackgroundBrush().

Note
If no foreground and background colors are specified, this function will not change the current background brush colors. This is because the corresponding function arguments default to zero.

◆ SetColorManagementFeatures()

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

Allows enabling or disabling all color management features at once.

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

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

◆ SetDynamicCursor() [1/4]

void pcl::ImageWindow::SetDynamicCursor ( const char **  xpm,
int  hx = 0,
int  hy = 0 
)

Sets the shape of the pointing device's cursor for the active dynamic session as an image in the XPM format.

Parameters
xpmAddress of an image in the XPM format, which will be used as the new cursor shape in Dynamic Operation GUI mode.
hx,hyCoordinates (horizontal, vertical) of the cursor hot spot relative to the upper left corner of the specified cursor shape image.

See the documentation for SetDynamicCursor( const Bitmap&, int, int ) for more information on dynamic mode cursors.

Deprecated:
This function has been deprecated and will be removed in a future version of PCL. Dynamic view cursors must always be specified as Bitmap objects in newly produced code.

◆ SetDynamicCursor() [2/4]

void pcl::ImageWindow::SetDynamicCursor ( const char **  xpm,
const Point p 
)
inline

Sets the shape of the pointing device's cursor for the active dynamic session as an image in the XPM format.

Calling this function is equivalent to:

SetDynamicCursor( xpm, p.x, p.y );
Deprecated:
This function has been deprecated and will be removed in a future version of PCL. Dynamic view cursors must always be specified as Bitmap objects in newly produced code.

Definition at line 2098 of file ImageWindow.h.

◆ SetDynamicCursor() [3/4]

void pcl::ImageWindow::SetDynamicCursor ( const Bitmap bmp,
int  hx = 0,
int  hy = 0 
)

Sets the shape of the pointing device's cursor for the active dynamic session as an ARGB bitmap.

Parameters
bmpReference to a bitmap that will be used as the new cursor shape for the Dynamic Operation GUI mode.
hx,hyCoordinates (horizontal, vertical) of the cursor hot spot relative to the upper left corner of the specified cursor shape bitmap.

If there is no active dynamic session, this function is ignored.

Modules call this function to adapt the cursor shape to specific interactive operations during dynamic sessions. Custom cursor shapes must be used by dynamic interfaces to provide accurate and meaningful feedback to the user.

The specified cursor shape will be used in the Dynamic Operation working GUI mode. It will not affect standard cursor shapes used by the GUI in other working modes (as Readout, Zoom In, etc).

◆ SetDynamicCursor() [4/4]

void pcl::ImageWindow::SetDynamicCursor ( const Bitmap bmp,
const Point p 
)
inline

Sets the shape of the pointing device's cursor for the active dynamic session as a RGBA bitmap.

Calling this function is equivalent to:

SetDynamicCursor( bmp, p.x, p.y );

Definition at line 2135 of file ImageWindow.h.

◆ SetGlobalRGBWS()

static void pcl::ImageWindow::SetGlobalRGBWS ( const RGBColorSystem rgbws)
static

Sets the parameters of the global RGB working space (RGBWS) in the core PixInsight application.

Parameters
rgbwsReference to an object whose parameters will be copied to the global RGBWS.

See the documentation for GetGlobalRGBWS() for a description of the global RGBWS in PixInsight.

◆ SetICCProfile() [1/2]

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

Sets the current ICC profile for this image window as a copy of an existing ICC profile.

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

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

◆ SetICCProfile() [2/2]

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

Sets the current ICC profile for this image window 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 this image window.

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

◆ SetKeywords()

void pcl::ImageWindow::SetKeywords ( const FITSKeywordArray keywords)

Sets the FITS header keywords for this image as a copy of the set of keywords in the specified container.

Parameters
keywordsReference to a FITS keyword array whose contents will be copied to the list of FITS keywords of this image.

The previous set of FITS keywords in this image, if any, is lost and replaced by the specified set.

◆ SetMask()

void pcl::ImageWindow::SetMask ( ImageWindow w,
bool  inverted = false 
)

Selects an image as the current mask for this image window.

Parameters
wReference to an image window whose image will be selected as a mask for this window.
invertedTrue to activate mask inversion.

◆ SetMaskMode()

void pcl::ImageWindow::SetMaskMode ( mask_mode  mode)

Sets the current mask rendering mode for this image window.

Parameters
modeSpecifies the new mode that will be used to render masks. Supported mask rendition modes are identified through symbolic constants defined in the MaskMode namespace.

◆ SetResolution() [1/2]

void pcl::ImageWindow::SetResolution ( double  xRes,
double  yRes,
bool  metric = false 
)

Sets image resolution parameters for this image window.

Parameters
xResHorizontal resolution in pixels per resolution unit. Must be > 0.
yResVertical resolution in pixels per resolution unit. Must be > 0.
metricIndicates the resolution unit in which resolution is expressed for both axes. If this parameter is true, resolution is expressed in pixels per centimeter; if it is false, resolution is in pixels per inch.

◆ SetResolution() [2/2]

void pcl::ImageWindow::SetResolution ( double  r,
bool  metric = false 
)
inline

Sets equal image resolution parameters for both axes in this image window.

Parameters
rResolution in pixels per resolution unit. This value is to be applied to both axes (horizontal, vertical) of the image in this window.
metricIndicates the resolution unit in which resolution is expressed. If this parameter is true, resolution is expressed in pixels per centimeter; if it is false, resolution is in pixels per inch.

Definition at line 1425 of file ImageWindow.h.

◆ SetRGBWS()

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

Sets the RGB working space (RGBWS) for this image window.

Parameters
rgbwsReference to a RGBWS that will be associated with this image window.

◆ SetSampleFormat()

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

Converts the image in this window 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 this image to a floating point data format; false to transform this image to an integer data format.

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

◆ SetSwapDirectories()

static bool pcl::ImageWindow::SetSwapDirectories ( const StringList directories)
static

Attempts to set a new list of directories for storage of swap files.

To be able to set a new list of directories for swap file storage, a module must have enough privileges to change global settings on the PixInsight platform. If the calling module has insufficient privileges, this function returns false and no changes are done.

The specified list can contain zero or more path specifications to existing directories. If more than one directory is specified, all of them must be supported by different physical devices (usually hard disks) on the system. Read the documentation for the ImageVariant::WriteSwapFiles() member function for more information about parallel disk I/O operations and their associated risks.

If the specified list is empty, the PixInsight platform will perform a reset of the swap directories list to its default settings. This usually means that all swap files will be generated and maintained on the system's temporary storage directory (the value of the TEMP or TMP environmental variables by default) using single-threaded disk I/O operations.

◆ SetTransparencyMode()

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

Sets the current transparency rendering mode for this image window.

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::ImageWindow::SetViewport ( double  cx,
double  cy,
int  zoom = 0 
)

Sets new viewport central location coordinates and zoom factor for this image window.

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:
Zoom Factor    Screen Zoom (screen pixels : image pixels)
===========    ==========================================
     0               Current zoom factor (no change)
  1 or -1            1:1 (actual pixels)
     2               2:1 (x2 magnification)
     3               3:1 (x3 magnification)
    ...
    -2               1:2 (1/2 reduction)
    -3               1:3 (1/3 reduction)
    ...
           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 of the active view is not changed since the default value of this parameter is zero; see the table above.

If this image window is visible, calling this function causes an immediate regeneration of the screen rendition for the visible viewport region. This includes regeneration of screen renditions depending on active dynamic interfaces.

◆ SetViewport() [2/2]

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

Sets new viewport central location and zoom factor for this image window.

Calling this function is equivalent to:

SetViewport( center.x, center.y, int );

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

Definition at line 1805 of file ImageWindow.h.

◆ SetViewportPosition() [1/2]

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

Sets the viewport position in this image window to the specified x and y viewport coordinates.

If this image window is visible, calling this function causes an immediate regeneration of the screen rendition for the visible viewport region. This includes regeneration of screen renditions depending on active dynamic interfaces.

◆ SetViewportPosition() [2/2]

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

Sets the viewport position in this image window to the specified position p in viewport coordinates.

Calling this function is equivalent to:

SetViewportPosition( p.x, p.y );

Definition at line 1939 of file ImageWindow.h.

◆ SetZoomFactor()

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

Sets the zoom factor for the viewport in this image window to the specified value z.

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

◆ Show()

void pcl::ImageWindow::Show ( )

Shows this image window, if it was previously hidden.

◆ ShowMask()

void pcl::ImageWindow::ShowMask ( bool  = true)

Shows the mask of this image window, i.e. enables mask visibility.

◆ SwapDirectories()

static StringList pcl::ImageWindow::SwapDirectories ( )
static

Returns the current list of directories for storage of swap image files.

Swap files are generated and maintained by the PixInsight core application to store temporary image data. By default, the returned list contains a single string with the system's temporary storage directory (usually the value of the TEMP or TMP environmental variables).

When the returned list contains two or more directories, PixInsight uses parallel disk I/O operations to store and retrieve swap files on separate physical devices, which greatly improves performance of history traversal operations (as undo/redo operations).

◆ TerminateDynamicSession()

static bool pcl::ImageWindow::TerminateDynamicSession ( bool  closeInterface = true)
static

Terminates the current dynamic session, if there is one active, and optionally closes the active dynamic interface.

If the calling module is the owner of the active dynamic interface, the dynamic session is terminated immediately.

If the calling module is not the owner of the active dynamic interface (i.e., if the active dynamic interface is a foreign object for the calling module), then the PixInsight core application will ask the user if it is ok to terminate the active dynamic session, providing complete information about the calling module. This is a security enforcement procedure.

◆ TransparencyColor()

RGBA pcl::ImageWindow::TransparencyColor ( ) const

Returns the color to be used in this image window 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::ImageWindow::TransparencyMode ( ) const

Returns the current transparency rendering mode for this image window.

Supported transparency modes are defined in the TransparencyMode namespace.

◆ UpdateImageRect() [1/2]

void pcl::ImageWindow::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 );

Definition at line 2633 of file ImageWindow.h.

◆ UpdateImageRect() [2/2]

void pcl::ImageWindow::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.

◆ UpdateMaskReferences()

void pcl::ImageWindow::UpdateMaskReferences ( )

Updates the screen renditions of all visible image windows that are currently masked by this window. This includes only masked image windows with enabled mask visibility.

◆ UpdateSelection()

void pcl::ImageWindow::UpdateSelection ( )

Requests a screen viewport update for the current rectangular selection.

◆ UpdateViewport()

void pcl::ImageWindow::UpdateViewport ( )

Requests a screen update for the entire visible viewport region in this image window.

◆ UpdateViewportRect() [1/2]

void pcl::ImageWindow::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 );

Definition at line 2604 of file ImageWindow.h.

◆ UpdateViewportRect() [2/2]

void pcl::ImageWindow::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.

◆ UseGlobalRGBWS()

void pcl::ImageWindow::UseGlobalRGBWS ( )

Associates this image window with the global RGB working space.

See the documentation for GetGlobalRGBWS() for a description of the global RGBWS in PixInsight.

◆ UsingGlobalRGBWS()

bool pcl::ImageWindow::UsingGlobalRGBWS ( ) const

Returns true iff this image window is associated with the global RGB working space (RGBWS).

See the documentation for GetGlobalRGBWS() for a description of the global RGBWS in PixInsight.

◆ ViewportBitmap() [1/2]

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

Returns a RGBA bitmap with a screen rendition of a viewport region of this image window.

Calling this function is equivalent to:

ViewportBitmap( r.x0, r.y0, r.x1, r.y1, flags );

Definition at line 2694 of file ImageWindow.h.

◆ ViewportBitmap() [2/2]

Bitmap pcl::ImageWindow::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 image window.

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 the current view of this image window. It will be magnified or reduced according to the current zoom factor. It will not contain auxiliary vectorial elements (as preview rectangles), or other renditions of any kind that depend on active dynamic interfaces.

◆ ViewportHeight()

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

Gets the current height of the viewport in this image window.

Definition at line 1902 of file ImageWindow.h.

◆ ViewportPosition()

Point pcl::ImageWindow::ViewportPosition ( ) const

Returns the current viewport position in this image window.

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::ImageWindow::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() [2/4]

void pcl::ImageWindow::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() [3/4]

double pcl::ImageWindow::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() [4/4]

template<typename T >
double pcl::ImageWindow::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 2312 of file ImageWindow.h.

◆ ViewportToGlobal() [1/3]

void pcl::ImageWindow::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.

◆ ViewportToGlobal() [2/3]

Point pcl::ImageWindow::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 2459 of file ImageWindow.h.

◆ ViewportToGlobal() [3/3]

Rect pcl::ImageWindow::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 2471 of file ImageWindow.h.

◆ ViewportToImage() [1/7]

void pcl::ImageWindow::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() [2/7]

void pcl::ImageWindow::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() [3/7]

template<typename T >
DPoint pcl::ImageWindow::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 2214 of file ImageWindow.h.

◆ ViewportToImage() [4/7]

template<typename T >
DRect pcl::ImageWindow::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 2227 of file ImageWindow.h.

◆ ViewportToImage() [5/7]

void pcl::ImageWindow::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.

◆ ViewportToImage() [6/7]

void pcl::ImageWindow::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() [7/7]

template<typename T >
void pcl::ImageWindow::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 2267 of file ImageWindow.h.

◆ ViewportUpdateRect()

Rect pcl::ImageWindow::ViewportUpdateRect ( ) const

Returns a rectangle in viewport coordinates that includes all pending viewport update regions for this image window.

◆ ViewportWidth()

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

Gets the current width of the viewport in this image window.

Definition at line 1892 of file ImageWindow.h.

◆ VisibleViewportHeight()

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

Returns the height in pixels of the current visible viewport region in this image window.

Definition at line 1966 of file ImageWindow.h.

◆ VisibleViewportRect()

Rect pcl::ImageWindow::VisibleViewportRect ( ) const

Gets the current visible viewport region in this image window.

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::ImageWindow::VisibleViewportWidth ( ) const
inline

Returns the width in pixels of the current visible viewport region in this image window.

Definition at line 1957 of file ImageWindow.h.

◆ WindowByFilePath()

static ImageWindow pcl::ImageWindow::WindowByFilePath ( const String filePath)
static

Returns the image window where the specified file path has been loaded. If no image has been loaded from the specified path, this function returns ImageWindow::Null().

◆ WindowById()

static ImageWindow pcl::ImageWindow::WindowById ( const IsoString id)
static

Returns a image window with the specified image identifier. If no image exists with the specified identifier, this function returns ImageWindow::Null().

◆ ZoomFactor()

int pcl::ImageWindow::ZoomFactor ( ) const

Returns the current zoom factor in the viewport of this image window.

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

◆ ZoomIn()

void pcl::ImageWindow::ZoomIn ( )
inline

Increments the current zoom factor for the viewport in this image window.

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

Definition at line 1855 of file ImageWindow.h.

◆ ZoomOut()

void pcl::ImageWindow::ZoomOut ( )
inline

Decrements the current zoom factor for the viewport in this image window.

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

Definition at line 1867 of file ImageWindow.h.

◆ ZoomToFit()

void pcl::ImageWindow::ZoomToFit ( bool  allowMagnification = true)

Selects the largest viewport zoom factor that allows showing the entire image in this image window, changing its size as necessary, but not its position on its parent workspace.

If the allowMagnification argument is false, this function will not select a zoom factor greater than one, even if doing so would be possible without exceeding the visible area of its parent workspace.


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