1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
21 #include "vvInfoPanel.h"
22 #include "clitkMemoryUsage.h"
23 #include "clitkConfiguration.h"
25 //------------------------------------------------------------------------------
26 vvInfoPanel::vvInfoPanel(QWidget * parent):QWidget(parent)
29 #if CLITK_MEMORY_INFO==0
30 memoryUsageLabel->hide();
33 //------------------------------------------------------------------------------
35 //------------------------------------------------------------------------------
36 void vvInfoPanel::setTransformation(QString text)
38 transformationLabel->setText(text);
41 //------------------------------------------------------------------------------
43 void vvInfoPanel::setFileName(QString text)
46 imageLabel->setText("..." + text.right(27));
48 imageLabel->setText(text);
50 //------------------------------------------------------------------------------
53 //------------------------------------------------------------------------------
54 void vvInfoPanel::setDimension(QString text)
56 dimensionLabel->setText(text);
58 //------------------------------------------------------------------------------
61 //------------------------------------------------------------------------------
62 void vvInfoPanel::setSizeMM(QString text)
64 sizeMMLabel->setText(text);
66 //------------------------------------------------------------------------------
69 //------------------------------------------------------------------------------
70 void vvInfoPanel::setNPixel(QString text)
72 nPixelLabel->setText(text);
74 //------------------------------------------------------------------------------
77 //------------------------------------------------------------------------------
78 void vvInfoPanel::setSizePixel(QString text)
80 sizePixelLabel->setText(text);
82 //------------------------------------------------------------------------------
85 //------------------------------------------------------------------------------
86 void vvInfoPanel::setOrigin(QString text)
88 originLabel->setText(text);
90 //------------------------------------------------------------------------------
93 //------------------------------------------------------------------------------
94 void vvInfoPanel::setSpacing(QString text)
96 spacingLabel->setText(text);
98 //------------------------------------------------------------------------------
101 //------------------------------------------------------------------------------
102 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
108 world += QString::number(x,'f',1) + " ";
109 world += QString::number(y,'f',1) + " ";
110 world += QString::number(z,'f',1) + " ";
112 mouse += QString::number(X,'f',1) + " ";
113 mouse += QString::number(Y,'f',1) + " ";
114 mouse += QString::number(Z,'f',1) + " ";
116 val += QString::number(value);
118 worldPosLabel->setText(world);
119 pixelPosLabel->setText(mouse);
120 valueLabel->setText(val);
122 //------------------------------------------------------------------------------
125 //------------------------------------------------------------------------------
126 void vvInfoPanel::setMemoryInMb(QString text)
128 memoryUsageLabel->setText("<font color=\"blue\">Memory usage :</font> "+text);
130 //------------------------------------------------------------------------------