dip::viewer::SliceViewer class

Interactive nD tensor image viewer.

Contents

Base classes

class dip::viewer::Viewer abstract
A Window for viewing a dip::Image more...

Aliases

using Ptr = std::shared_ptr<SliceViewer>
A pointer to a SliceViewer.

Functions

auto clone() -> std::shared_ptr<SliceViewer>
Duplicate the SliceViewer window.
auto complex() const -> dip::String
Get what to do with complex numbers. One of: "real", "imag", "magnitude", "phase".
static auto Create(dip::Image const& image, dip::String name = "SliceViewer", dip::uint width = 0, dip::uint height = 0) -> dip::viewer::SliceViewer::Ptr
Construct a new SliceViewer. more...
auto dims() const -> dip::IntegerArray
Return the visualized dimensions (MainX, MainY, LeftX, TopY). -1 means no dimension is used.
auto element() const -> dip::uint
Get tensor element visualized.
auto image() -> dip::Image const& override
Return the image shown.
auto labels() const -> dip::String
Get labels used for axes. A string, one character per axis.
void link(dip::viewer::SliceViewer& other)
Link this viewer to another, compatible one.
auto lookupTable() const -> dip::String
Get grey-value to color mapping option. One of: “original, “ternary”, “grey”, “sequential”, “divergent”, “periodic”, “labels”.
auto mapping() const -> dip::String
Get grey-value mapping options.
auto mappingRange() const -> dip::viewer::FloatRange
Get mapped value range (colorbar limits).
auto operatingPoint() const -> dip::UnsignedArray
Get coordinates of selected point, which also determines which slice is shown.
auto options() -> dip::viewer::ViewingOptions& override
Return the (modifyable) options struct for this image display.
auto origin() const -> dip::FloatArray
Get the display origin.
auto original() -> dip::Image const& override
Return the original image shown.
auto projection() const -> dip::String
Get type of projection. One of: "none", "min", "mean", "max".
void refreshImage()
Recompute the display.
void setComplex(dip::String const& complex)
Set what to do with complex numbers. One of: "real", "imag", "magnitude", "phase".
void setDims(dip::IntegerArray const& dims)
Set the dimensions to visualize (MainX, MainY, LeftX, TopY). Use -1 to not map to any image dimension.
void setElement(dip::uint element)
Set tensor element to visualize.
void setImage(dip::Image const& image) override
Changes the image shown.
void setLabels(dip::String const& labels)
Set labels to use for axes. A string, one character per axis.
void setLookupTable(dip::String const& lookupTable)
Set grey-value to color mapping option. One of: “original, “ternary”, “grey”, “sequential”, “divergent”, “periodic”, “labels”.
void setMapping(dip::String const& mapping)
Set grey-value mapping options, also sets mapping_range.
void setMappingRange(dip::viewer::FloatRange const& range)
Set mapped value range (colorbar limits). Disables automatic mapping.
void setOperatingPoint(dip::UnsignedArray const& point)
Set coordinates of selected point, which also determines which slice is shown.
void setOrigin(dip::FloatArray const& origin)
Set the display origin, for moving the image around.
void setProjection(dip::String const& projection)
Set type of projection. One of: "none", "min", "mean", "max".
void setZoom(dip::FloatArray const& zoom)
Set the zoom factor per dimension. Also determines relative viewport sizes.
void updateLinkedViewers()
Update linked viewers.
auto zoom() const -> dip::FloatArray
Get the zoom factor per dimension.

Alias documentation

using Ptr = std::shared_ptr<SliceViewer>

A pointer to a SliceViewer.

Function documentation

static dip::viewer::SliceViewer::Ptr Create( dip::Image const& image, dip::String name = "SliceViewer", dip::uint width = 0, dip::uint height = 0)

Construct a new SliceViewer.

As the constructor is protected, this is the only way to create a SliceViewer.

Example usage:

manager.createWindow( dip::viewer::SliceViewer::Create( image ));

std::shared_ptr<SliceViewer> clone( )

Duplicate the SliceViewer window.

dip::viewer::ViewingOptions& options( ) override

Return the (modifyable) options struct for this image display.

dip::Image const& image( ) override

Return the image shown.

dip::Image const& original( ) override

Return the original image shown.

void setImage( dip::Image const& image) override

Changes the image shown.

void refreshImage( )

Recompute the display.

void updateLinkedViewers( )

Update linked viewers.

dip::IntegerArray dims( ) const

Return the visualized dimensions (MainX, MainY, LeftX, TopY). -1 means no dimension is used.

void setDims( dip::IntegerArray const& dims)

Set the dimensions to visualize (MainX, MainY, LeftX, TopY). Use -1 to not map to any image dimension.

dip::UnsignedArray operatingPoint( ) const

Get coordinates of selected point, which also determines which slice is shown.

void setOperatingPoint( dip::UnsignedArray const& point)

Set coordinates of selected point, which also determines which slice is shown.

dip::String complex( ) const

Get what to do with complex numbers. One of: "real", "imag", "magnitude", "phase".

void setComplex( dip::String const& complex)

Set what to do with complex numbers. One of: "real", "imag", "magnitude", "phase".

dip::String projection( ) const

Get type of projection. One of: "none", "min", "mean", "max".

void setProjection( dip::String const& projection)

Set type of projection. One of: "none", "min", "mean", "max".

dip::String labels( ) const

Get labels used for axes. A string, one character per axis.

void setLabels( dip::String const& labels)

Set labels to use for axes. A string, one character per axis.

dip::viewer::FloatRange mappingRange( ) const

Get mapped value range (colorbar limits).

void setMappingRange( dip::viewer::FloatRange const& range)

Set mapped value range (colorbar limits). Disables automatic mapping.

dip::String mapping( ) const

Get grey-value mapping options.

void setMapping( dip::String const& mapping)

Set grey-value mapping options, also sets mapping_range.

dip::uint element( ) const

Get tensor element visualized.

void setElement( dip::uint element)

Set tensor element to visualize.

dip::String lookupTable( ) const

Get grey-value to color mapping option. One of: “original, “ternary”, “grey”, “sequential”, “divergent”, “periodic”, “labels”.

void setLookupTable( dip::String const& lookupTable)

Set grey-value to color mapping option. One of: “original, “ternary”, “grey”, “sequential”, “divergent”, “periodic”, “labels”.

dip::FloatArray zoom( ) const

Get the zoom factor per dimension.

void setZoom( dip::FloatArray const& zoom)

Set the zoom factor per dimension. Also determines relative viewport sizes.

dip::FloatArray origin( ) const

Get the display origin.

void setOrigin( dip::FloatArray const& origin)

Set the display origin, for moving the image around.