Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Controller Class Reference

The Controller class is one of the most important classes of the User Interface, and is responsible to manage the images. More...

#include <controller.h>

Inheritance diagram for Controller:
Inheritance graph
Collaboration diagram for Controller:
Collaboration graph

Public Types

enum  { MaxRecentFiles = 10 }
 

Public Slots

void update ()
 update updates the image pixmaps. More...
 
void setCurrentImagePos (int position)
 setCurrentImagePos More...
 
void loadNextImage ()
 loadNextImage is a slot called from controlsdock that loads the next image ( like an circular list ). More...
 
void setCurrentSlice (size_t view, size_t slice)
 setCurrentSlice is called by the imageViewer when the slider or the spinbox have theis values updated. More...
 
void setZoom (int value)
 setZoom updates the zoom factor. More...
 
void setInterpolation (bool isSmooth)
 setInterpolation switches between smoot and fast interpolation. More...
 
void rotateAll90 ()
 rotateAll90 rotates all views in 90 degrees. More...
 
void rotate90 (size_t view)
 rotate90 rotates a view in 90 degrees. More...
 
void flipH (size_t view)
 flipH mirrors the current view on X axis. More...
 
void flipV (size_t view)
 flipV mirrors the current view on Y axis. More...
 

Signals

void currentImageChanged ()
 This signal is emmited every time the current image changes. More...
 
void imageUpdated ()
 This signal is emmited every time the current image is updated. More...
 
void containerUpdated ()
 This signal is emmited avery time the m_images vector is updated. More...
 
void recentFilesUpdated ()
 recentFilesUpdated More...
 

Public Member Functions

 Controller (int views, QObject *parent=0)
 Controller's constructor. More...
 
GuiImagecurrentImage ()
 currentImage More...
 
GuiImageimageAt (int pos)
 currentImage More...
 
int currentImagePos () const
 currentImagePos More...
 
bool addImage (QString fname)
 addImage Adds an image to vector m_images. More...
 
bool addLabel (QString label)
 addLabel Adds a label to the current image. More...
 
bool removeCurrentLabel ()
 removeCurrentLabel removes the current label from current image. More...
 
void removeCurrentImage ()
 removeCurrentImage removes the current image from vector. More...
 
bool isEmpty ()
 isEmpty More...
 
void clear ()
 clear Clears the image vector, and resets thumbnails. More...
 
int size ()
 size More...
 
void setThumbsWidget (ThumbsWidget *thumbsWidget)
 setThumbsWidget setThumbsWidget sets the pointer to the thumbnails dock. More...
 
DisplayFormatcurrentFormat ()
 currentFormat returns the modality of current image. More...
 
QGraphicsPixmapItem * getPixmapItem (size_t view)
 getPixmapItem returns the PixmapItem of the view. More...
 
QGraphicsPixmapItem * getLabelItem (size_t view)
 getLabelItem returns the LabelItem of the view. More...
 

Detailed Description

The Controller class is one of the most important classes of the User Interface, and is responsible to manage the images.

Definition at line 17 of file controller.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MaxRecentFiles 

Definition at line 54 of file controller.h.

Constructor & Destructor Documentation

Controller::Controller ( int  views,
QObject *  parent = 0 
)
explicit

Controller's constructor.

Parameters
viewsis the number of the views of the imageViewer.
parentis the parent object.

Definition at line 8 of file controller.cpp.

Member Function Documentation

bool Controller::addImage ( QString  fname)

addImage Adds an image to vector m_images.

Parameters
fnameis the file name of the Image to be opened.

Definition at line 39 of file controller.cpp.

bool Controller::addLabel ( QString  label)

addLabel Adds a label to the current image.

Parameters
labelis the file name of the label to be opened.

Definition at line 78 of file controller.cpp.

void Controller::clear ( )

clear Clears the image vector, and resets thumbnails.

Definition at line 105 of file controller.cpp.

void Controller::containerUpdated ( )
signal

This signal is emmited avery time the m_images vector is updated.

DisplayFormat * Controller::currentFormat ( )

currentFormat returns the modality of current image.

Definition at line 230 of file controller.cpp.

GuiImage * Controller::currentImage ( )

currentImage

Returns
A pointer to the current guiimage.

Definition at line 24 of file controller.cpp.

void Controller::currentImageChanged ( )
signal

This signal is emmited every time the current image changes.

int Controller::currentImagePos ( ) const

currentImagePos

Returns
The current image position

Definition at line 35 of file controller.cpp.

void Controller::flipH ( size_t  view)
slot

flipH mirrors the current view on X axis.

Parameters
viewView number

Definition at line 196 of file controller.cpp.

void Controller::flipV ( size_t  view)
slot

flipV mirrors the current view on Y axis.

Parameters
viewView number

Definition at line 201 of file controller.cpp.

QGraphicsPixmapItem * Controller::getLabelItem ( size_t  view)

getLabelItem returns the LabelItem of the view.

Parameters
viewis the number of the view;
Returns

Definition at line 247 of file controller.cpp.

QGraphicsPixmapItem * Controller::getPixmapItem ( size_t  view)

getPixmapItem returns the PixmapItem of the view.

Parameters
viewis the number of the view;
Returns

Definition at line 243 of file controller.cpp.

GuiImage * Controller::imageAt ( int  pos)

currentImage

Returns
A pointer to the guiimage at position pos.

Definition at line 28 of file controller.cpp.

void Controller::imageUpdated ( )
signal

This signal is emmited every time the current image is updated.

bool Controller::isEmpty ( )

isEmpty

Returns
true the vector is empty

Definition at line 101 of file controller.cpp.

void Controller::loadNextImage ( )
slot

loadNextImage is a slot called from controlsdock that loads the next image ( like an circular list ).

Definition at line 156 of file controller.cpp.

void Controller::recentFilesUpdated ( )
signal

recentFilesUpdated

void Controller::removeCurrentImage ( )

removeCurrentImage removes the current image from vector.

Definition at line 89 of file controller.cpp.

bool Controller::removeCurrentLabel ( )

removeCurrentLabel removes the current label from current image.

Returns
true if removed successfully.

Definition at line 84 of file controller.cpp.

void Controller::rotate90 ( size_t  view)
slot

rotate90 rotates a view in 90 degrees.

Parameters
viewView number

Definition at line 191 of file controller.cpp.

void Controller::rotateAll90 ( )
slot

rotateAll90 rotates all views in 90 degrees.

Definition at line 186 of file controller.cpp.

void Controller::setCurrentImagePos ( int  position)
slot

setCurrentImagePos

Parameters
positionis the position of the image in the images vector.

Definition at line 144 of file controller.cpp.

void Controller::setCurrentSlice ( size_t  view,
size_t  slice 
)
slot

setCurrentSlice is called by the imageViewer when the slider or the spinbox have theis values updated.

Parameters
view
slice

Definition at line 165 of file controller.cpp.

void Controller::setInterpolation ( bool  isSmooth)
slot

setInterpolation switches between smoot and fast interpolation.

Parameters
isSmooth

Definition at line 175 of file controller.cpp.

void Controller::setThumbsWidget ( ThumbsWidget thumbsWidget)

setThumbsWidget setThumbsWidget sets the pointer to the thumbnails dock.

Parameters
thumbsWidget

Definition at line 225 of file controller.cpp.

void Controller::setZoom ( int  value)
slot

setZoom updates the zoom factor.

Parameters
value

Definition at line 169 of file controller.cpp.

int Controller::size ( )

size

Returns
The image vector size.

Definition at line 114 of file controller.cpp.

void Controller::update ( )
slot

update updates the image pixmaps.

Definition at line 118 of file controller.cpp.


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