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 //------------------------------------------------------------------------------
56 //------------------------------------------------------------------------------
57 void vvInfoPanel::setDimension(QString text)
59 dimensionLabel->setText(text);
61 //------------------------------------------------------------------------------
64 //------------------------------------------------------------------------------
65 void vvInfoPanel::setSizeMM(QString text)
67 sizeMMLabel->setText(text);
69 //------------------------------------------------------------------------------
72 //------------------------------------------------------------------------------
73 void vvInfoPanel::setNPixel(QString text)
75 nPixelLabel->setText(text);
77 //------------------------------------------------------------------------------
80 //------------------------------------------------------------------------------
81 void vvInfoPanel::setSizePixel(QString text)
83 sizePixelLabel->setText(text);
85 //------------------------------------------------------------------------------
88 //------------------------------------------------------------------------------
89 void vvInfoPanel::setOrigin(QString text)
91 originLabel->setText(text);
93 //------------------------------------------------------------------------------
96 //------------------------------------------------------------------------------
97 void vvInfoPanel::setSpacing(QString text)
99 spacingLabel->setText(text);
101 //------------------------------------------------------------------------------
104 //------------------------------------------------------------------------------
105 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
111 world += QString::number(x,'f',1) + " ";
112 world += QString::number(y,'f',1) + " ";
113 world += QString::number(z,'f',1) + " ";
115 mouse += QString::number(X,'f',1) + " ";
116 mouse += QString::number(Y,'f',1) + " ";
117 mouse += QString::number(Z,'f',1) + " ";
119 val += QString::number(value);
121 worldPosLabel->setText(world);
122 pixelPosLabel->setText(mouse);
123 valueLabel->setText(val);
125 //------------------------------------------------------------------------------
128 //------------------------------------------------------------------------------
129 void vvInfoPanel::setMemoryInMb(QString text)
131 memoryUsageLabel->setText("<font color=\"blue\">Memory usage :</font> "+text);
133 //------------------------------------------------------------------------------