![]() |
open_iA
2020.01
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
|
vtk-based slicer widget. "Channels" (i.e. image layers) are inserted via the addChannel method More...
#include <iASlicer.h>
Public Types | |
| enum | InteractionMode { Normal, SnakeEdit, SnakeShow } |
Public Slots | |
| void | addPoint (double x, double y, double z) |
| Adds a new spline point to the end of the spline curve. More... | |
| void | deleteSnakeLine () |
| Deletes the current spline curve. More... | |
| void | deselectPoint () |
| Function to deselect points in snake slicer (necessary to avoid endless loops with signals and slots). More... | |
| void | menuDeleteSnakeLine () |
| Called when the delete snake line menu is clicked. More... | |
| void | movePoint (size_t selectedPointIndex, double xPos, double yPos, double zPos) |
| Moves a point of the snake slicer to a new position. More... | |
| void | rotateSlice (double angle) |
| void | saveAsImage () |
| Save an image of the image viewer native resolution or the current view. More... | |
| void | saveImageStack () |
| Save an image stack of the current view. More... | |
| void | saveMovie () |
| Save a movie of a full slice-through of the specimen from top to bottom. More... | |
| bool | setArbitraryProfile (int pointInd, double *Pos, bool doClamp=false) |
| Sets coordinates for line profile. More... | |
| void | setArbitraryProfileOn (bool isOn) |
| Toggle the possibility to move start and end point of the profile. More... | |
| void | setSlabCompositeMode (int compositeMode) |
| void | setSlabThickness (int thickness) |
| void | setSliceNumber (int sliceNumber) |
| void | setSliceProfileOn (bool isOn) |
| Toggle the "raw" profile mode, i.e. whether the profile is shown on top of the slicer image. More... | |
| void | switchInteractionMode (int mode) |
| Switches between interaction modi (normal, snake slicer view or editing) More... | |
| void | toggleInteractorState () |
| Toggle interactor state of this slicer between enabled/disabled. More... | |
| void | update () |
Signals | |
| void | addedPoint (double x, double y, double z) |
| void | altMouseWheel (int angle) |
| void | arbitraryProfileChanged (int pointInd, double *Pos) |
| void | clicked () |
| void | clicked (int x, int y, int z) |
| void | ctrlMouseWheel (int angle) |
| void | dblClicked () |
| void | deletedSnakeLine () |
| void | deselectedPoint () |
| void | movedPoint (size_t selectedPointIndex, double xPos, double yPos, double zPos) |
| void | msg (QString s) |
| void | oslicerPos (int x, int y, int z, int mode) |
| triggered on mouse move More... | |
| void | pick () |
| void | progress (int) |
| void | released (int x, int y, int z) |
| void | rightClicked (int x, int y, int z) |
| void | shiftMouseWheel (int angle) |
| void | sliceNumberChanged (int mode, int sliceNumber) |
| triggered when slice number changed. More... | |
| void | sliceRangeChanged (int minIdx, int maxIdx) |
| void | sliceRotated () |
| triggered when slice was rotated More... | |
| void | switchedMode (int mode) |
| void | updateSignal () |
| void | userInteraction () |
Public Member Functions | |
| void | addImageActor (vtkSmartPointer< vtkImageActor > imgActor) |
| void | blend (vtkAlgorithmOutput *data1, vtkAlgorithmOutput *data2, double opacity, double *range) |
| Blend two images. Should probably be implemented in terms of two channels? More... | |
| vtkCamera * | camera () |
| Access to the slicer's main renderer's camera. More... | |
| void | disableInteractor () |
| void | enableInteractor () |
| void | execute (vtkObject *caller, unsigned long eventId, void *callData) |
| iASlicer (QWidget *parent, const iASlicerMode mode, bool decorations=true, bool magicLensAvailable=true, vtkAbstractTransform *transform=nullptr, vtkPoints *snakeSlicerPoints=nullptr) | |
| Creates a new slicer widget. More... | |
| vtkRenderWindowInteractor * | interactor () |
| Access to the interactor of this slicer's render window. More... | |
| iASlicerMode | mode () const |
| Get the slice mode (which axis-aligned slice-plane is used for slicing). More... | |
| QCursor | mouseCursor () |
| void | removeImageActor (vtkSmartPointer< vtkImageActor > imgActor) |
| vtkRenderer * | renderer () |
| Access to the slicer's main renderer. More... | |
| vtkGenericOpenGLRenderWindow * | renderWindow () |
| Access to the slicer's render window. More... | |
| void | resetCamera () |
| Resets the slicer's main renderer's camera such that all channels in it are visible. More... | |
| void | saveSliceMovie (QString const &fileName, int qual=2) |
| void | setBackground (double r, double g, double b) |
| Sets the background color of the slicer. More... | |
| void | setCamera (vtkCamera *camera, bool camOwner=true) |
| Set the camera for the slicer's main renderer. More... | |
| void | setDefaultInteractor () |
| void | setIndex (int x, int y, int z) |
| void | setLinkedMdiChild (MdiChild *mdiChild) |
| in case the "linked mdi" feature is used, use this to set the mdi child this slicer is linked to. More... | |
| void | setMode (const iASlicerMode mode) |
| Sets the slice mode (which axis-aligned slice-plane to use for slicing). More... | |
| void | setMouseCursor (QString const &s) |
| void | setPositionMarkerCenter (double x, double y) |
| Set the position of the position marker (in slicer coordinates). More... | |
| void | setResliceAxesOrigin (double x, double y, double z) |
| void | setRightButtonDragZoomEnabled (bool enabled) |
| void | setScalarBarTF (vtkScalarsToColors *ctf) |
| void | setShowText (bool isVisible) |
| Enable/disable the tooltip text. More... | |
| void | setStatisticalExtent (int statExt) |
| void | setTransform (vtkAbstractTransform *tr) |
| void | setup (iASingleSlicerSettings const &settings) |
| Sets up the slicer with the given settings. More... | |
| void | showIsolines (bool s) |
| Enable/disable contour lines. More... | |
| void | showPosition (bool s) |
| int | sliceNumber () const |
| Get current slice number. More... | |
| void | triggerSliceRangeChange () |
| call if the dimension of the input in direction of the slice axis has changed. More... | |
| void | updateChannelMappers () |
| virtual | ~iASlicer () |
| void | setMagicLensEnabled (bool isEnabled) |
| Magic Lens methods. More... | |
| void | setMagicLensSize (int newSize) |
| int | magicLensSize () const |
| void | setMagicLensFrameWidth (int newWidth) |
| void | setMagicLensCount (int count) |
| void | setMagicLensInput (uint id) |
| uint | magicLensInput () const |
| void | setMagicLensOpacity (double opacity) |
| double | magicLensOpacity () const |
| void | updateMagicLensColors () |
| void | updateMagicLens () |
| iAMagicLens * | magicLens () |
| void | addChannel (uint id, iAChannelData const &chData, bool enable) |
| management of channels - each channel represents one "layer" More... | |
| void | removeChannel (uint id) |
| void | updateChannel (uint id, iAChannelData const &chData) |
| iAChannelSlicerData * | channel (uint id) |
| void | setChannelOpacity (uint id, double opacity) |
| void | enableChannel (uint id, bool enabled) |
| bool | hasChannel (uint id) const |
| void | setROIVisible (bool isVisible) |
| ROI rectangle. More... | |
| void | updateROI (int const roi[6]) |
| void | setContours (int numberOfContours, double contourMin, double contourMax) |
| set contour line parameters. More... | |
| void | setContours (int numberOfContours, double const *contourValues) |
Protected Member Functions | |
| void | contextMenuEvent (QContextMenuEvent *event) override |
| void | defaultOutput () |
| void | executeKeyPressEvent () |
| void | keyPressEvent (QKeyEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | printVoxelInformation () |
| void | resizeEvent (QResizeEvent *event) override |
| void | updateBackground () |
| void | wheelEvent (QWheelEvent *) override |
Protected Attributes | |
| iAArbitraryProfileOnSlicer * | m_arbProfile |
| implements drawing the start and end point of the "arbitrary" profile More... | |
| QMenu * | m_contextMenuMagicLens |
| context menu for when magic lens is shown More... | |
| QMenu * | m_contextMenuSnakeSlicer |
| context menu for when in snake slice edit mode More... | |
| InteractionMode | m_interactionMode |
| current edit mode More... | |
| bool | m_isArbProfEnabled |
| if arbitrary profile mode is enabled More... | |
| bool | m_isSliceProfEnabled |
| if slice profile mode is enabled More... | |
| iASlicerProfile * | m_sliceProfile |
| implements the raw slice profile More... | |
| iASnakeSpline * | m_snakeSpline |
| holds the visualization data for the points of the snake splicer More... | |
| vtkPoints * | m_worldSnakePoints |
| points of the snake slicer (owned by mdichild, not by this slicer) More... | |
| int | m_xInd |
| int | m_yInd |
| int | m_zInd |
| current position More... | |
vtk-based slicer widget. "Channels" (i.e. image layers) are inserted via the addChannel method
| iASlicer::iASlicer | ( | QWidget * | parent, |
| const iASlicerMode | mode, | ||
| bool | decorations = true, |
||
| bool | magicLensAvailable = true, |
||
| vtkAbstractTransform * | transform = nullptr, |
||
| vtkPoints * | snakeSlicerPoints = nullptr |
||
| ) |
Creates a new slicer widget.
| parent | the parent widget; can be nullptr for no current parent. |
| mode | determines which axis-aligned slice-plane is used for slicing. |
| decorations | whether to show the scalar bar widget, the measure bar, the logo and the tooltip. |
| magicLensAvailable | whether a magic lens should be available. |
| transform | the basic transform the reslicers inside the channels of this slicer (should probably be removed here). |
| snakeSlicerPoints | the array of points in the snake slicer (leave at default nullptr if you don't require snake slicer). |
|
virtual |
| void iASlicer::addChannel | ( | uint | id, |
| iAChannelData const & | chData, | ||
| bool | enable | ||
| ) |
management of channels - each channel represents one "layer"
|
signal |
| void iASlicer::addImageActor | ( | vtkSmartPointer< vtkImageActor > | imgActor | ) |
|
slot |
Adds a new spline point to the end of the spline curve.
|
signal |
|
signal |
| void iASlicer::blend | ( | vtkAlgorithmOutput * | data1, |
| vtkAlgorithmOutput * | data2, | ||
| double | opacity, | ||
| double * | range | ||
| ) |
Blend two images. Should probably be implemented in terms of two channels?
| vtkCamera * iASlicer::camera | ( | ) |
Access to the slicer's main renderer's camera.
| iAChannelSlicerData * iASlicer::channel | ( | uint | id | ) |
|
signal |
|
signal |
|
overrideprotected |
|
signal |
|
signal |
|
protected |
|
signal |
|
slot |
Deletes the current spline curve.
|
signal |
|
slot |
Function to deselect points in snake slicer (necessary to avoid endless loops with signals and slots).
| void iASlicer::disableInteractor | ( | ) |
| void iASlicer::enableChannel | ( | uint | id, |
| bool | enabled | ||
| ) |
| void iASlicer::enableInteractor | ( | ) |
| void iASlicer::execute | ( | vtkObject * | caller, |
| unsigned long | eventId, | ||
| void * | callData | ||
| ) |
|
protected |
| bool iASlicer::hasChannel | ( | uint | id | ) | const |
| vtkRenderWindowInteractor * iASlicer::interactor | ( | ) |
Access to the interactor of this slicer's render window.
|
overrideprotected |
| iAMagicLens * iASlicer::magicLens | ( | ) |
| uint iASlicer::magicLensInput | ( | ) | const |
| double iASlicer::magicLensOpacity | ( | ) | const |
| int iASlicer::magicLensSize | ( | ) | const |
|
slot |
Called when the delete snake line menu is clicked.
| iASlicerMode iASlicer::mode | ( | ) | const |
Get the slice mode (which axis-aligned slice-plane is used for slicing).
| QCursor iASlicer::mouseCursor | ( | ) |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
signal |
|
slot |
Moves a point of the snake slicer to a new position.
|
signal |
|
signal |
triggered on mouse move
|
signal |
|
protected |
|
signal |
|
signal |
| void iASlicer::removeChannel | ( | uint | id | ) |
| void iASlicer::removeImageActor | ( | vtkSmartPointer< vtkImageActor > | imgActor | ) |
| vtkRenderer * iASlicer::renderer | ( | ) |
Access to the slicer's main renderer.
| vtkGenericOpenGLRenderWindow * iASlicer::renderWindow | ( | ) |
Access to the slicer's render window.
| void iASlicer::resetCamera | ( | ) |
Resets the slicer's main renderer's camera such that all channels in it are visible.
|
overrideprotected |
|
signal |
|
slot |
|
slot |
Save an image of the image viewer native resolution or the current view.
|
slot |
Save an image stack of the current view.
|
slot |
Save a movie of a full slice-through of the specimen from top to bottom.
| void iASlicer::saveSliceMovie | ( | QString const & | fileName, |
| int | qual = 2 |
||
| ) |
|
slot |
Sets coordinates for line profile.
|
slot |
Toggle the possibility to move start and end point of the profile.
| void iASlicer::setBackground | ( | double | r, |
| double | g, | ||
| double | b | ||
| ) |
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
| r | red color part (0..1) |
| g | green color part (0..1) |
| b | blue color part (0..1) |
| void iASlicer::setCamera | ( | vtkCamera * | camera, |
| bool | camOwner = true |
||
| ) |
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)
| camera | the new camera to assing |
| camOwner | whether the slicer should assume ownership of the camera. If true, Delete() will be called on it in the destructor |
| void iASlicer::setChannelOpacity | ( | uint | id, |
| double | opacity | ||
| ) |
| void iASlicer::setContours | ( | int | numberOfContours, |
| double const * | contourValues | ||
| ) |
| void iASlicer::setContours | ( | int | numberOfContours, |
| double | contourMin, | ||
| double | contourMax | ||
| ) |
set contour line parameters.
| void iASlicer::setDefaultInteractor | ( | ) |
| void iASlicer::setIndex | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) |
| void iASlicer::setLinkedMdiChild | ( | MdiChild * | mdiChild | ) |
in case the "linked mdi" feature is used, use this to set the mdi child this slicer is linked to.
| void iASlicer::setMagicLensCount | ( | int | count | ) |
| void iASlicer::setMagicLensEnabled | ( | bool | isEnabled | ) |
Magic Lens methods.
| void iASlicer::setMagicLensFrameWidth | ( | int | newWidth | ) |
| void iASlicer::setMagicLensInput | ( | uint | id | ) |
| void iASlicer::setMagicLensOpacity | ( | double | opacity | ) |
| void iASlicer::setMagicLensSize | ( | int | newSize | ) |
| void iASlicer::setMode | ( | const iASlicerMode | mode | ) |
Sets the slice mode (which axis-aligned slice-plane to use for slicing).
| void iASlicer::setMouseCursor | ( | QString const & | s | ) |
| void iASlicer::setPositionMarkerCenter | ( | double | x, |
| double | y | ||
| ) |
Set the position of the position marker (in slicer coordinates).
| void iASlicer::setResliceAxesOrigin | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
| void iASlicer::setRightButtonDragZoomEnabled | ( | bool | enabled | ) |
| void iASlicer::setROIVisible | ( | bool | isVisible | ) |
ROI rectangle.
| void iASlicer::setScalarBarTF | ( | vtkScalarsToColors * | ctf | ) |
| void iASlicer::setShowText | ( | bool | isVisible | ) |
Enable/disable the tooltip text.
|
slot |
|
slot |
|
slot |
|
slot |
Toggle the "raw" profile mode, i.e. whether the profile is shown on top of the slicer image.
| void iASlicer::setStatisticalExtent | ( | int | statExt | ) |
| void iASlicer::setTransform | ( | vtkAbstractTransform * | tr | ) |
| void iASlicer::setup | ( | iASingleSlicerSettings const & | settings | ) |
Sets up the slicer with the given settings.
|
signal |
| void iASlicer::showIsolines | ( | bool | s | ) |
Enable/disable contour lines.
| void iASlicer::showPosition | ( | bool | s | ) |
| int iASlicer::sliceNumber | ( | ) | const |
Get current slice number.
|
signal |
triggered when slice number changed.
| mode | slicer mode (=plane) |
| sliceNumber | number of the slice that was switched to |
|
signal |
|
signal |
triggered when slice was rotated
|
signal |
|
slot |
Switches between interaction modi (normal, snake slicer view or editing)
| mode | mode which should be switched to (see InteractionMode enum) |
|
slot |
Toggle interactor state of this slicer between enabled/disabled.
| void iASlicer::triggerSliceRangeChange | ( | ) |
call if the dimension of the input in direction of the slice axis has changed.
|
slot |
|
protected |
| void iASlicer::updateChannel | ( | uint | id, |
| iAChannelData const & | chData | ||
| ) |
| void iASlicer::updateChannelMappers | ( | ) |
| void iASlicer::updateMagicLens | ( | ) |
| void iASlicer::updateMagicLensColors | ( | ) |
| void iASlicer::updateROI | ( | int const | roi[6] | ) |
|
signal |
|
signal |
|
overrideprotected |
|
protected |
implements drawing the start and end point of the "arbitrary" profile
|
protected |
context menu for when magic lens is shown
|
protected |
context menu for when in snake slice edit mode
|
protected |
current edit mode
|
protected |
if arbitrary profile mode is enabled
|
protected |
if slice profile mode is enabled
|
protected |
implements the raw slice profile
|
protected |
holds the visualization data for the points of the snake splicer
|
protected |
points of the snake slicer (owned by mdichild, not by this slicer)
|
protected |
|
protected |
|
protected |
current position
1.8.16