open_iA 2024.7
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Static Public Attributes | List of all members
iASlicerImpl Class Reference

vtk-based slicer widget. "Channels" (i.e. image layers) are inserted via the addChannel method More...

#include <iASlicerImpl.h>

Inheritance diagram for iASlicerImpl:
[legend]
Collaboration diagram for iASlicerImpl:
[legend]

Public Slots

void rotateSlice (double angle) override
 
void saveAsImage () override
 Save an image of the image viewer native resolution or the current view.
 
void saveImageStack ()
 Save an image stack of the current view.
 
void saveMovie () override
 Save a movie of a full slice-through of the specimen from top to bottom.
 
void setAngle (int mode, double angle)
 to synchronize angles of all modes between different slicers
 
void setProfileHandlesOn (bool isOn)
 Toggle the possibility to move start and end point of the profile.
 
void setProfilePoint (int pointIdx, double const *globalPos)
 Sets coordinates for line profile.
 
void setSlabCompositeMode (int compositeMode)
 
void setSlabThickness (int thickness)
 
void setSliceNumber (int sliceNumber) override
 
void setSlicePosition (double slicePos) override
 
void setSliceProfileOn (bool isOn)
 Toggle the "raw" profile mode, i.e. whether the profile is shown on top of the slicer image.
 
void update () override
 
- Public Slots inherited from iASlicer
virtual void rotateSlice (double angle)=0
 
virtual void saveAsImage ()=0
 Save an image of the image viewer native resolution or the current view.
 
virtual void saveMovie ()=0
 Save a movie of a full slice-through of the specimen from top to bottom.
 
virtual void setSliceNumber (int sliceNumber)=0
 Set the current slice of the dataset currently sliced.
 
virtual void setSlicePosition (double slicePos)=0
 Set the position to slice.
 
virtual void update ()=0
 

Signals

void profilePointChanged (int pointIdx, double *globalPos)
 
void regionSelected (double minVal, double maxVal, uint channelID)
 
void sliceRangeChanged (int minIdx, int maxIdx, int val)
 triggered when the slice number range has changed; parameters are new minimum, maximum and current index
 
void sliceRotated (int mode, double angle)
 triggered when slice was rotated
 
- Signals inherited from iASlicer
void altMouseWheel (int angle)
 
void clicked ()
 
void ctrlMouseWheel (int angle)
 
void dblClicked ()
 
void leftClicked (double x, double y, double z)
 Triggered on mouse left button clicked.
 
void leftDragged (double x, double y, double z)
 Triggered on mouse move with left button clicked.
 
void leftReleased (double x, double y, double z)
 Triggered on mouse button released.
 
void magicLensToggled (bool enabled)
 
void mouseMoved (double x, double y, double z, int mode)
 Triggered on mouse move, sends x,y,z (world) coordinates and mode of slicer.
 
void rightClicked (double x, double y, double z)
 Triggered on mouse right button clicked.
 
void shiftMouseWheel (int angle)
 
void sliceNumberChanged (int mode, int sliceNumber)
 triggered when slice number changed.
 
void updateSignal ()
 
void userInteraction ()
 

Public Member Functions

 iASlicerImpl (QWidget *parent, const iASlicerMode mode, bool decorations=true, bool magicLensAvailable=true, vtkSmartPointer< vtkTransform > transform=vtkSmartPointer< vtkTransform >())
 Creates a new slicer widget.
 
virtual ~iASlicerImpl ()
 
void addImageActor (vtkSmartPointer< vtkImageActor > imgActor) override
 
void applySettings (QVariantMap const &settings) override
 Apply the given settings to the slicer.
 
vtkCamera * camera () override
 Access to the slicer's main renderer's camera.
 
void enableInteractor (bool b) override
 
void execute (vtkObject *caller, unsigned long eventId, void *callData) override
 
int globalAxis (int slicerAxis) override
 retrieve the global axis that is represented by the given local axis (e.g. for XY:, 0 -> X, 1 -> Y, 2 -> Z; for XZ: 0 -> X, 1 -> Z, ...)
 
vtkRenderWindowInteractor * interactor () override
 Access to the interactor of this slicer's render window.
 
bool isInteractorEnabled () const override
 
iASlicerMode mode () const override
 Get the slice mode (which axis-aligned slice-plane is used for slicing).
 
QCursor mouseCursor ()
 
void removeImageActor (vtkSmartPointer< vtkImageActor > imgActor) override
 
vtkRenderer * renderer () override
 Access to the slicer's main renderer.
 
void resetCamera () override
 Resets the slicer's main renderer's camera such that all channels in it are visible.
 
void saveSliceMovie (QString const &fileName, int start, int end, int qual, int fps)
 
void setBackground (QColor color) override
 Sets the background color of the slicer.
 
void setCamera (vtkCamera *camera, bool camOwner=true) override
 Set the camera for the slicer's main renderer.
 
void setDefaultInteractor () override
 
void setLinkedMdiChild (iAMdiChild *mdiChild) override
 in case the "linked mdi" feature is used, use this to set the mdi child this slicer is linked to.
 
void setMode (const iASlicerMode mode) override
 Sets the slice mode (which axis-aligned slice-plane to use for slicing).
 
void setMouseCursor (QString const &s)
 
void setPositionMarkerCenter (double x, double y, double z)
 Set the position of the position marker (in slicer coordinates).
 
void setPositionMarkerSize (int size)
 Set the size of the position marker cube (showing the current position in other views)
 
void setResliceAxesOrigin (double x, double y, double z) override
 
void setRightButtonDragZoomEnabled (bool enabled)
 
void setScalarBarTF (vtkScalarsToColors *ctf) override
 
void setShowTooltip (bool isVisible) override
 Enable/disable the tooltip text.
 
void setSlicerRange (uint channelID)
 call if the dimension of the input in direction of the slice axis has changed.
 
virtual QVariantMap const & settings () override
 retrieve current settings of this slicer
 
void showIsolines (bool s)
 Enable/disable contour lines.
 
void showPosition (bool s)
 
int sliceNumber () const override
 Get current slice number.
 
double slicePosition () const override
 Get current slice position.
 
std::pair< double, double > sliceRange () const override
 Retrieve minimum and maximum position of slice range.
 
double sliceThickness () const override
 Get thickness of a single slice (typically, the voxel spacing of the dataset being sliced in slice axis direction)
 
void updateChannelMappers () override
 
void setMagicLensEnabled (bool isEnabled) override
 Magic Lens methods.
 
void setMagicLensSize (int newSize)
 
int magicLensSize () const
 
void setMagicLensFrameWidth (int newWidth)
 
void setMagicLensCount (int count) override
 
void setMagicLensInput (uint id) override
 
uint magicLensInput () const override
 
void setMagicLensOpacity (double opacity) override
 
double magicLensOpacity () const override
 
void updateMagicLensColors () override
 
void updateMagicLens () override
 
void addChannel (uint id, iAChannelData const &chData, bool enable) override
 management of channels - each channel represents one "layer"
 
void removeChannel (uint id) override
 
void updateChannel (uint id, iAChannelData const &chData) override
 
iAChannelSlicerDatachannel (uint id) override
 
void setChannelOpacity (uint id, double opacity) override
 
void enableChannel (uint id, bool enabled) override
 
bool hasChannel (uint id) const override
 
void setROIVisible (bool isVisible) override
 ROI rectangle.
 
void updateROI (int const roi[6]) override
 
void setContours (int numberOfContours, double contourMin, double contourMax) override
 set contour line parameters.
 
void setContours (int numberOfContours, double const *contourValues) override
 
- Public Member Functions inherited from iASlicer
 iASlicer (QWidget *parent)
 
virtual ~iASlicer ()
 
- Public Member Functions inherited from iAQVTKWidget
 iAQVTKWidget (QWidget *parent=nullptr)
 Creates the widget; makes sure its inner vtk render window is set, and sets an appropriate surface format.
 
bool event (QEvent *evt) override
 
void updateAll ()
 

Static Public Attributes

static constexpr const char AdjustWindowLevelEnabled [] = "Adjust Window+Level via Mouse Click+Drag"
 
static constexpr const char BackgroundColor [] = "Background Color"
 
static constexpr const char LinearInterpolation [] = "Linear Interpolation"
 
static constexpr const char MagicLensFrameWidth [] = "Magic Lens Frame Width"
 
static constexpr const char MagicLensSize [] = "Magic Lens Size"
 
static constexpr const char MaxIsoValue [] = "Maximum Iso Value"
 
static constexpr const char MinIsoValue [] = "Minimum Iso Value"
 
static constexpr const char MouseCursor [] = "Mouse Cursor"
 
static constexpr const char NumberOfIsoLines [] = "Number of Isolines"
 
static constexpr const char ShowAxesCaption [] = "Show Axes Caption"
 
static constexpr const char ShowIsoLines [] = "Show Isolines"
 
static constexpr const char ShowPosition [] = "Show Position"
 
static constexpr const char ShowTooltip [] = "Show Tooltip"
 
static constexpr const char ToolTipFontSize [] = "Tooltip Font Size (pt)"
 

Detailed Description

vtk-based slicer widget. "Channels" (i.e. image layers) are inserted via the addChannel method

Constructor & Destructor Documentation

◆ iASlicerImpl()

iASlicerImpl::iASlicerImpl ( QWidget * parent,
const iASlicerMode mode,
bool decorations = true,
bool magicLensAvailable = true,
vtkSmartPointer< vtkTransform > transform = vtkSmartPointer<vtkTransform>() )

Creates a new slicer widget.

Parameters
parentthe parent widget; can be nullptr for no current parent.
modedetermines which axis-aligned slice-plane is used for slicing.
decorationswhether to show the scalar bar widget, the measure bar and the tooltip.
magicLensAvailablewhether a magic lens should be available.
transformif specified, a transform shared between slicers (e.g. for sharing rotation)

◆ ~iASlicerImpl()

iASlicerImpl::~iASlicerImpl ( )
virtual

Member Function Documentation

◆ addChannel()

void iASlicerImpl::addChannel ( uint id,
iAChannelData const & chData,
bool enable )
overridevirtual

management of channels - each channel represents one "layer"

Implements iASlicer.

◆ addImageActor()

void iASlicerImpl::addImageActor ( vtkSmartPointer< vtkImageActor > imgActor)
overridevirtual

Implements iASlicer.

◆ applySettings()

void iASlicerImpl::applySettings ( QVariantMap const & settings)
overridevirtual

Apply the given settings to the slicer.

Implements iASlicer.

◆ camera()

vtkCamera * iASlicerImpl::camera ( )
overridevirtual

Access to the slicer's main renderer's camera.

Implements iASlicer.

◆ channel()

iAChannelSlicerData * iASlicerImpl::channel ( uint id)
overridevirtual

Implements iASlicer.

◆ enableChannel()

void iASlicerImpl::enableChannel ( uint id,
bool enabled )
overridevirtual

Implements iASlicer.

◆ enableInteractor()

void iASlicerImpl::enableInteractor ( bool b)
overridevirtual

Implements iASlicer.

◆ execute()

void iASlicerImpl::execute ( vtkObject * caller,
unsigned long eventId,
void * callData )
overridevirtual

Implements iASlicer.

◆ globalAxis()

int iASlicerImpl::globalAxis ( int slicerAxis)
overridevirtual

retrieve the global axis that is represented by the given local axis (e.g. for XY:, 0 -> X, 1 -> Y, 2 -> Z; for XZ: 0 -> X, 1 -> Z, ...)

Implements iASlicer.

◆ hasChannel()

bool iASlicerImpl::hasChannel ( uint id) const
overridevirtual

Implements iASlicer.

◆ interactor()

vtkRenderWindowInteractor * iASlicerImpl::interactor ( )
overridevirtual

Access to the interactor of this slicer's render window.

Implements iASlicer.

◆ isInteractorEnabled()

bool iASlicerImpl::isInteractorEnabled ( ) const
overridevirtual

Implements iASlicer.

◆ magicLensInput()

uint iASlicerImpl::magicLensInput ( ) const
overridevirtual

Implements iASlicer.

◆ magicLensOpacity()

double iASlicerImpl::magicLensOpacity ( ) const
overridevirtual

Implements iASlicer.

◆ magicLensSize()

int iASlicerImpl::magicLensSize ( ) const

◆ mode()

iASlicerMode iASlicerImpl::mode ( ) const
overridevirtual

Get the slice mode (which axis-aligned slice-plane is used for slicing).

Implements iASlicer.

◆ mouseCursor()

QCursor iASlicerImpl::mouseCursor ( )

◆ profilePointChanged

void iASlicerImpl::profilePointChanged ( int pointIdx,
double * globalPos )
signal

◆ regionSelected

void iASlicerImpl::regionSelected ( double minVal,
double maxVal,
uint channelID )
signal

◆ removeChannel()

void iASlicerImpl::removeChannel ( uint id)
overridevirtual

Implements iASlicer.

◆ removeImageActor()

void iASlicerImpl::removeImageActor ( vtkSmartPointer< vtkImageActor > imgActor)
overridevirtual

Implements iASlicer.

◆ renderer()

vtkRenderer * iASlicerImpl::renderer ( )
overridevirtual

Access to the slicer's main renderer.

Implements iASlicer.

◆ resetCamera()

void iASlicerImpl::resetCamera ( )
overridevirtual

Resets the slicer's main renderer's camera such that all channels in it are visible.

Implements iASlicer.

◆ rotateSlice

void iASlicerImpl::rotateSlice ( double angle)
overrideslot

◆ saveAsImage

void iASlicerImpl::saveAsImage ( )
overrideslot

Save an image of the image viewer native resolution or the current view.

◆ saveImageStack

void iASlicerImpl::saveImageStack ( )
slot

Save an image stack of the current view.

◆ saveMovie

void iASlicerImpl::saveMovie ( )
overrideslot

Save a movie of a full slice-through of the specimen from top to bottom.

◆ saveSliceMovie()

void iASlicerImpl::saveSliceMovie ( QString const & fileName,
int start,
int end,
int qual,
int fps )

◆ setAngle

void iASlicerImpl::setAngle ( int mode,
double angle )
slot

to synchronize angles of all modes between different slicers

◆ setBackground()

void iASlicerImpl::setBackground ( QColor color)
overridevirtual

Sets the background color of the slicer.

By default, background color is auto-determined via the slicer mode. If set manually via this method, it will keep the given color indefinitely

Parameters
colorthe background color part

Implements iASlicer.

◆ setCamera()

void iASlicerImpl::setCamera ( vtkCamera * camera,
bool camOwner = true )
overridevirtual

Set the camera for the slicer's main renderer.

Use this if you want share the camera between multiple views (i.e. synchronize their viewing parameters)

Parameters
camerathe new camera to assing
camOwnerwhether the slicer should assume ownership of the camera. If true, Delete() will be called on it in the destructor

Implements iASlicer.

◆ setChannelOpacity()

void iASlicerImpl::setChannelOpacity ( uint id,
double opacity )
overridevirtual

Implements iASlicer.

◆ setContours() [1/2]

void iASlicerImpl::setContours ( int numberOfContours,
double const * contourValues )
overridevirtual

Implements iASlicer.

◆ setContours() [2/2]

void iASlicerImpl::setContours ( int numberOfContours,
double contourMin,
double contourMax )
overridevirtual

set contour line parameters.

Implements iASlicer.

◆ setDefaultInteractor()

void iASlicerImpl::setDefaultInteractor ( )
overridevirtual

Implements iASlicer.

◆ setLinkedMdiChild()

void iASlicerImpl::setLinkedMdiChild ( iAMdiChild * mdiChild)
overridevirtual

in case the "linked mdi" feature is used, use this to set the mdi child this slicer is linked to.

Implements iASlicer.

◆ setMagicLensCount()

void iASlicerImpl::setMagicLensCount ( int count)
overridevirtual

Implements iASlicer.

◆ setMagicLensEnabled()

void iASlicerImpl::setMagicLensEnabled ( bool isEnabled)
overridevirtual

Magic Lens methods.

Implements iASlicer.

◆ setMagicLensFrameWidth()

void iASlicerImpl::setMagicLensFrameWidth ( int newWidth)

◆ setMagicLensInput()

void iASlicerImpl::setMagicLensInput ( uint id)
overridevirtual

Implements iASlicer.

◆ setMagicLensOpacity()

void iASlicerImpl::setMagicLensOpacity ( double opacity)
overridevirtual

Implements iASlicer.

◆ setMagicLensSize()

void iASlicerImpl::setMagicLensSize ( int newSize)

◆ setMode()

void iASlicerImpl::setMode ( const iASlicerMode mode)
overridevirtual

Sets the slice mode (which axis-aligned slice-plane to use for slicing).

Implements iASlicer.

◆ setMouseCursor()

void iASlicerImpl::setMouseCursor ( QString const & s)

◆ setPositionMarkerCenter()

void iASlicerImpl::setPositionMarkerCenter ( double x,
double y,
double z )

Set the position of the position marker (in slicer coordinates).

◆ setPositionMarkerSize()

void iASlicerImpl::setPositionMarkerSize ( int size)

Set the size of the position marker cube (showing the current position in other views)

◆ setProfileHandlesOn

void iASlicerImpl::setProfileHandlesOn ( bool isOn)
slot

Toggle the possibility to move start and end point of the profile.

◆ setProfilePoint

void iASlicerImpl::setProfilePoint ( int pointIdx,
double const * globalPos )
slot

Sets coordinates for line profile.

◆ setResliceAxesOrigin()

void iASlicerImpl::setResliceAxesOrigin ( double x,
double y,
double z )
overridevirtual

Implements iASlicer.

◆ setRightButtonDragZoomEnabled()

void iASlicerImpl::setRightButtonDragZoomEnabled ( bool enabled)

◆ setROIVisible()

void iASlicerImpl::setROIVisible ( bool isVisible)
overridevirtual

ROI rectangle.

Implements iASlicer.

◆ setScalarBarTF()

void iASlicerImpl::setScalarBarTF ( vtkScalarsToColors * ctf)
overridevirtual

Implements iASlicer.

◆ setShowTooltip()

void iASlicerImpl::setShowTooltip ( bool isVisible)
overridevirtual

Enable/disable the tooltip text.

Implements iASlicer.

◆ setSlabCompositeMode

void iASlicerImpl::setSlabCompositeMode ( int compositeMode)
slot

◆ setSlabThickness

void iASlicerImpl::setSlabThickness ( int thickness)
slot

◆ setSliceNumber

void iASlicerImpl::setSliceNumber ( int sliceNumber)
overrideslot

◆ setSlicePosition

void iASlicerImpl::setSlicePosition ( double slicePos)
overrideslot

◆ setSliceProfileOn

void iASlicerImpl::setSliceProfileOn ( bool isOn)
slot

Toggle the "raw" profile mode, i.e. whether the profile is shown on top of the slicer image.

◆ setSlicerRange()

void iASlicerImpl::setSlicerRange ( uint channelID)

call if the dimension of the input in direction of the slice axis has changed.

◆ settings()

QVariantMap const & iASlicerImpl::settings ( )
overridevirtual

retrieve current settings of this slicer

Implements iASlicer.

◆ showIsolines()

void iASlicerImpl::showIsolines ( bool s)

Enable/disable contour lines.

◆ showPosition()

void iASlicerImpl::showPosition ( bool s)

◆ sliceNumber()

int iASlicerImpl::sliceNumber ( ) const
overridevirtual

Get current slice number.

Implements iASlicer.

◆ slicePosition()

double iASlicerImpl::slicePosition ( ) const
overridevirtual

Get current slice position.

Implements iASlicer.

◆ sliceRange()

std::pair< double, double > iASlicerImpl::sliceRange ( ) const
overridevirtual

Retrieve minimum and maximum position of slice range.

Implements iASlicer.

◆ sliceRangeChanged

void iASlicerImpl::sliceRangeChanged ( int minIdx,
int maxIdx,
int val )
signal

triggered when the slice number range has changed; parameters are new minimum, maximum and current index

◆ sliceRotated

void iASlicerImpl::sliceRotated ( int mode,
double angle )
signal

triggered when slice was rotated

◆ sliceThickness()

double iASlicerImpl::sliceThickness ( ) const
overridevirtual

Get thickness of a single slice (typically, the voxel spacing of the dataset being sliced in slice axis direction)

Implements iASlicer.

◆ update

void iASlicerImpl::update ( )
overrideslot

◆ updateChannel()

void iASlicerImpl::updateChannel ( uint id,
iAChannelData const & chData )
overridevirtual

Implements iASlicer.

◆ updateChannelMappers()

void iASlicerImpl::updateChannelMappers ( )
overridevirtual

Implements iASlicer.

◆ updateMagicLens()

void iASlicerImpl::updateMagicLens ( )
overridevirtual

Implements iASlicer.

◆ updateMagicLensColors()

void iASlicerImpl::updateMagicLensColors ( )
overridevirtual

Implements iASlicer.

◆ updateROI()

void iASlicerImpl::updateROI ( int const roi[6])
overridevirtual

Implements iASlicer.

Member Data Documentation

◆ AdjustWindowLevelEnabled

constexpr const char iASlicerImpl::AdjustWindowLevelEnabled[] = "Adjust Window+Level via Mouse Click+Drag"
staticconstexpr

◆ BackgroundColor

constexpr const char iASlicerImpl::BackgroundColor[] = "Background Color"
staticconstexpr

◆ LinearInterpolation

constexpr const char iASlicerImpl::LinearInterpolation[] = "Linear Interpolation"
staticconstexpr

◆ MagicLensFrameWidth

constexpr const char iASlicerImpl::MagicLensFrameWidth[] = "Magic Lens Frame Width"
staticconstexpr

◆ MagicLensSize

constexpr const char iASlicerImpl::MagicLensSize[] = "Magic Lens Size"
staticconstexpr

◆ MaxIsoValue

constexpr const char iASlicerImpl::MaxIsoValue[] = "Maximum Iso Value"
staticconstexpr

◆ MinIsoValue

constexpr const char iASlicerImpl::MinIsoValue[] = "Minimum Iso Value"
staticconstexpr

◆ MouseCursor

constexpr const char iASlicerImpl::MouseCursor[] = "Mouse Cursor"
staticconstexpr

◆ NumberOfIsoLines

constexpr const char iASlicerImpl::NumberOfIsoLines[] = "Number of Isolines"
staticconstexpr

◆ ShowAxesCaption

constexpr const char iASlicerImpl::ShowAxesCaption[] = "Show Axes Caption"
staticconstexpr

◆ ShowIsoLines

constexpr const char iASlicerImpl::ShowIsoLines[] = "Show Isolines"
staticconstexpr

◆ ShowPosition

constexpr const char iASlicerImpl::ShowPosition[] = "Show Position"
staticconstexpr

◆ ShowTooltip

constexpr const char iASlicerImpl::ShowTooltip[] = "Show Tooltip"
staticconstexpr

◆ ToolTipFontSize

constexpr const char iASlicerImpl::ToolTipFontSize[] = "Tooltip Font Size (pt)"
staticconstexpr

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