Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
guiimage.h
Go to the documentation of this file.
1 #ifndef GUIIMAGE_H
2 #define GUIIMAGE_H
3 #include "Color.hpp"
4 #include "Geometrics.hpp"
5 #include "Image.hpp"
6 #include "MultiImage.hpp"
7 #include "RealColor.hpp"
8 #include "Signal.hpp"
9 #include "displayformat.h"
10 #include <QObject>
11 #include <QPixmap>
12 #include <QVector>
13 
14 class Tool;
15 
20 class GuiImage : public QObject {
21  Q_OBJECT
26  /* Probably not used anymore. Should be removed soon. */
27  Modality m_modality;
31  Bial::MultiImage image;
35  QString m_fileName;
39  QVector< QPixmap > cachedPixmaps;
43  QVector< bool > needUpdate;
47  QVector< int > equalization;
51  Bial::Signal histogram;
55  Bial::Signal equalized;
59  bool m_equalizeHistogram;
63  QVector< Bial::FastTransform > transform;
67  QVector< Bial::BBox > bounding;
71  QVector< size_t > m_currentSlice;
75  int m_max;
79  int m_fmax;
83  size_t m_currentToolPos;
84 
85 private:
92  void updateBoundings( size_t axis );
93 
94 public:
98  QVector< Tool* > tools;
104  explicit GuiImage( QString fName, QObject *parent = 0 );
108  virtual ~GuiImage( );
113  Tool* currentTool( );
118  Modality modality( );
123  QString fileName( );
130  QPixmap getSlice( size_t view );
136  size_t width( size_t view );
142  size_t heigth( size_t view );
148  size_t depth( size_t view );
154  size_t currentSlice( size_t view );
161  void setCurrentSlice( size_t view, size_t slice );
168  Bial::Point3D getPosition( QPointF pos, size_t view );
174  Bial::FastTransform getTransform( size_t axis );
188 
193  size_t getDims( ) const;
202  void rotateAll90( );
207  void rotate90( size_t view );
212  void flipH( size_t view );
217  void flipV( size_t view );
222  int max( );
227  float fmax( );
232  bool getEqualizeHistogram( ) const;
237  void setEqualizeHistogram( bool equalizeHistogram );
242  const Bial::Signal &getHistogram( ) const;
243 
251  int getPixel( int x, int y, int z = 0 );
252  size_t currentToolPos( ) const;
253  void setCurrentToolPos( const size_t &currentToolPos );
254 
255  QPointF getIntersection( size_t view );
256 signals:
261  void imageUpdated( );
262 };
263 
264 #endif /* GUIIMAGE_H */
int max()
max is the maximum integer intensity of the input image. Used for int and Color images.
Definition: guiimage.cpp:439
Modality
Definition: displayformat.h:9
Tool * currentTool()
currentTool returns the current Tool.
Definition: guiimage.cpp:150
virtual ~GuiImage()
Destructor.
Definition: guiimage.cpp:146
Definition: tool.h:10
const Bial::Signal & getHistogram() const
getHistogram returns the image histogram.
Definition: guiimage.cpp:463
void rotateAll90()
rotateAll90 rotates all views in 90 degrees.
Definition: guiimage.cpp:433
Signal handeling declaration.
Definition: Signal.hpp:20
void flipH(size_t view)
flipH mirrors the current view on X axis.
Definition: guiimage.cpp:415
Bial::MultiImageType getImageType() const
getImageType returns image type among int, float, Color and RealColor.
Definition: guiimage.cpp:354
The GuiImage class is a bridge to the Bial::Image data structure to the QImage data structure...
Definition: guiimage.h:20
size_t heigth(size_t view)
heigth is the view heigth.
Definition: guiimage.cpp:322
size_t currentToolPos() const
Definition: guiimage.cpp:525
GuiImage(QString fName, QObject *parent=0)
GuiImage is the GuiImage class constructor.
Definition: guiimage.cpp:17
bool getEqualizeHistogram() const
getEqualizeHistogram returns a boolean value that says if the image must be equalized or not...
Definition: guiimage.cpp:451
The Point3D class is a Geometric representation of a point in 3D space. A point is a zero­dimension...
Definition: Geometrics.hpp:218
Bial::Point3D getPosition(QPointF pos, size_t view)
getPosition transforms the scene position to the input image coordinates.
Definition: guiimage.cpp:344
Bial::Vector< size_t > getDim() const
getDim
Definition: guiimage.cpp:390
size_t depth(size_t view)
depth is the number of slices of the view.
Definition: guiimage.cpp:326
Modality modality()
modality is the image modality getter.
Definition: guiimage.cpp:160
void setCurrentToolPos(const size_t &currentToolPos)
Definition: guiimage.cpp:529
void flipV(size_t view)
flipV mirrors the current view on Y axis.
Definition: guiimage.cpp:424
QPixmap getSlice(size_t view)
getSlice calculates and returns a QImage with the current slice of the view.
Definition: guiimage.cpp:175
size_t width(size_t view)
width is the view width.
Definition: guiimage.cpp:318
void setCurrentSlice(size_t view, size_t slice)
currentSlice sets the view&#39;s current slice.
Definition: guiimage.cpp:330
Bial::FastTransform getTransform(size_t axis)
getTransform returns the transform matrix of the views.
Definition: guiimage.cpp:350
float fmax()
fmax is the maximum float intensity of the input image. Used for float and RealColor images...
Definition: guiimage.cpp:443
The MultiImage class may have only one of the following image types: int, float, Color, or RealColor.
Definition: MultiImage.hpp:34
QPointF getIntersection(size_t view)
Definition: guiimage.cpp:168
QString fileName()
fileName is the image absolute path getter.
Definition: guiimage.cpp:164
void imageUpdated()
imageUpdated is called each time a internal property is updated, after that the image views are updat...
Bial::Image< int > & getIntImage() const
get*Image
Definition: guiimage.cpp:358
int getPixel(int x, int y, int z=0)
getPixel returns the pixel intensity of the image at the given position.
Definition: guiimage.cpp:470
void rotate90(size_t view)
rotate90 rotates a view in 90 degrees.
Definition: guiimage.cpp:406
size_t currentSlice(size_t view)
currentSlice is the view&#39;s current slice.
Definition: guiimage.cpp:447
QVector< Tool * > tools
tools is a vector containing the image tools.
Definition: guiimage.h:98
Bial::Image< Bial::Color > & getClrImage() const
Definition: guiimage.cpp:366
void setEqualizeHistogram(bool equalizeHistogram)
setEqualizeHistogram updates a boolean value that says if the image must be equalized or not...
Definition: guiimage.cpp:455
MultiImageType
The MultiImageType class is used to identify which image type is open in MultiImage.
Definition: MultiImage.hpp:23
Bial::Image< float > & getFltImage() const
Definition: guiimage.cpp:362
Bial::Image< Bial::RealColor > & getRclImage() const
Definition: guiimage.cpp:370
size_t getDims() const
getDims
Definition: guiimage.cpp:374