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();
32 QFont font = transformationLabel->font();
33 font.setStyleHint(QFont::TypeWriter);
34 transformationLabel->setFont(font);
36 //------------------------------------------------------------------------------
38 //------------------------------------------------------------------------------
39 void vvInfoPanel::setTransformation(QString text)
41 transformationLabel->setText(text);
44 //------------------------------------------------------------------------------
46 void vvInfoPanel::setFileName(QString text)
49 imageLabel->setText("..." + text.right(27));
51 imageLabel->setText(text);
53 //------------------------------------------------------------------------------
55 void vvInfoPanel::setImageCreationTime(QString text)
57 creationTimeLabel->setText(text);
60 //------------------------------------------------------------------------------
61 void vvInfoPanel::setDimension(QString text)
63 dimensionLabel->setText(text);
65 //------------------------------------------------------------------------------
68 //------------------------------------------------------------------------------
69 void vvInfoPanel::setSizeMM(QString text)
71 sizeMMLabel->setText(text);
73 //------------------------------------------------------------------------------
76 //------------------------------------------------------------------------------
77 void vvInfoPanel::setNPixel(QString text)
79 nPixelLabel->setText(text);
81 //------------------------------------------------------------------------------
84 //------------------------------------------------------------------------------
85 void vvInfoPanel::setSizePixel(QString text)
87 sizePixelLabel->setText(text);
89 //------------------------------------------------------------------------------
92 //------------------------------------------------------------------------------
93 void vvInfoPanel::setOrigin(QString text)
95 originLabel->setText(text);
97 //------------------------------------------------------------------------------
100 //------------------------------------------------------------------------------
101 void vvInfoPanel::setSpacing(QString text)
103 spacingLabel->setText(text);
105 //------------------------------------------------------------------------------
108 //------------------------------------------------------------------------------
109 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
115 world += QString::number(x,'f',1) + " ";
116 world += QString::number(y,'f',1) + " ";
117 world += QString::number(z,'f',1) + " ";
119 mouse += QString::number(X,'f',1) + " ";
120 mouse += QString::number(Y,'f',1) + " ";
121 mouse += QString::number(Z,'f',1) + " ";
123 val += QString::number(value);
125 worldPosLabel->setText(world);
126 pixelPosLabel->setText(mouse);
127 valueLabel->setText(val);
129 //------------------------------------------------------------------------------
132 //------------------------------------------------------------------------------
133 void vvInfoPanel::setMemoryInMb(QString text)
135 memoryUsageLabel->setText("<font color=\"blue\">Memory usage :</font> "+text);
137 //------------------------------------------------------------------------------