7 setObjectName(
"DefaultTool" );
15 COMMENT(
"Mouse released.", 2 );
16 if( buttons & Qt::LeftButton ) {
17 changeOtherSlices( pt, axis );
24 if( buttons & Qt::LeftButton ) {
25 changeOtherSlices( pt, axis );
32 if( buttons & Qt::LeftButton ) {
33 changeOtherSlices( pt, axis );
44 void DefaultTool::changeOtherSlices( QPointF posF,
size_t view ) {
45 COMMENT(
"Changing slice position of other frames based on image position.", 2 );
49 transform( (
double ) posF.x( ), ( double ) posF.y( ), ( double )
guiImage->
currentSlice( view ) );
50 for(
size_t other = 0; other < 3; ++other ) {
54 size_t pos =
static_cast< size_t >( round( otherPt.
z ) );
55 if( pos < guiImage->depth( other ) ) {
65 COMMENT(
"ImageViewer::updateOverlay", 0 );
66 pt.setX( qMin( qMax( pt.x( ), 0.0 ), (
double )
guiImage->
width( axis ) ) );
67 pt.setY( qMin( qMax( pt.y( ), 0.0 ), (
double )
guiImage->
heigth( axis ) ) );
74 for(
size_t other = 0; other <
size; ++other ) {
double z
Point position in z.
DisplayFormat * currentFormat()
currentFormat returns the modality of current image.
The GuiImage class is a bridge to the Bial::Image data structure to the QImage data structure...
size_t heigth(size_t view)
heigth is the view heigth.
The Point3D class is a Geometric representation of a point in 3D space. A point is a zerodimension...
void setOverlayPos(QPointF pos)
Controller * controller() const
Modality modality()
modality is the image modality getter.
double y
Point position in y.
size_t width(size_t view)
width is the view width.
void setCurrentSlice(size_t view, size_t slice)
currentSlice sets the view's current slice.
The Controller class is one of the most important classes of the User Interface, and is responsible t...
GraphicsScene * getScene(size_t axis)
Bial::FastTransform getTransform(size_t axis)
getTransform returns the transform matrix of the views.
size_t currentSlice(size_t view)
currentSlice is the view's current slice.
QPointF overlayPos() const
void setOverlay(bool overlay)