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://oncora1.lyon.fnclcc.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"
24 //------------------------------------------------------------------------------
25 void vvInfoPanel::setFileName(QString text)
28 imageLabel->setText("..." + text.right(27));
30 imageLabel->setText(text);
32 //------------------------------------------------------------------------------
35 //------------------------------------------------------------------------------
36 void vvInfoPanel::setDimension(QString text)
38 dimensionLabel->setText(text);
40 //------------------------------------------------------------------------------
43 //------------------------------------------------------------------------------
44 void vvInfoPanel::setSizeMM(QString text)
46 sizeMMLabel->setText(text);
48 //------------------------------------------------------------------------------
51 //------------------------------------------------------------------------------
52 void vvInfoPanel::setNPixel(QString text)
54 nPixelLabel->setText(text);
56 //------------------------------------------------------------------------------
59 //------------------------------------------------------------------------------
60 void vvInfoPanel::setSizePixel(QString text)
62 sizePixelLabel->setText(text);
64 //------------------------------------------------------------------------------
67 //------------------------------------------------------------------------------
68 void vvInfoPanel::setOrigin(QString text)
70 originLabel->setText(text);
72 //------------------------------------------------------------------------------
75 //------------------------------------------------------------------------------
76 void vvInfoPanel::setSpacing(QString text)
78 spacingLabel->setText(text);
80 //------------------------------------------------------------------------------
83 //------------------------------------------------------------------------------
84 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
90 world += QString::number(x,'f',1) + " ";
91 world += QString::number(y,'f',1) + " ";
92 world += QString::number(z,'f',1) + " ";
94 mouse += QString::number(X,'f',1) + " ";
95 mouse += QString::number(Y,'f',1) + " ";
96 mouse += QString::number(Z,'f',1) + " ";
98 val += QString::number(value);
100 worldPosLabel->setText(world);
101 pixelPosLabel->setText(mouse);
102 valueLabel->setText(val);
104 //------------------------------------------------------------------------------
107 //------------------------------------------------------------------------------
108 void vvInfoPanel::setViews(int window, int view, int slice)
113 viewString = "Sagital, ";
117 viewString = "Coronal, ";
121 viewString = "Axial, ";
126 QString text = viewString;
128 text += "current slice : ";
129 text += QString::number(slice);
136 ULLabel->setText(text);
140 URLabel->setText(text);
144 DLLabel->setText(text);
148 DRLabel->setText(text);
153 //------------------------------------------------------------------------------
156 //------------------------------------------------------------------------------
157 void vvInfoPanel::setMemoryInMb(QString text)
159 memoryUsageLabel->setText("Memory usage: "+text);
161 //------------------------------------------------------------------------------