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::setTransformation(QString text)
27 transformationLabel->setText(text);
30 //------------------------------------------------------------------------------
32 void vvInfoPanel::setFileName(QString text)
35 imageLabel->setText("..." + text.right(27));
37 imageLabel->setText(text);
39 //------------------------------------------------------------------------------
42 //------------------------------------------------------------------------------
43 void vvInfoPanel::setDimension(QString text)
45 dimensionLabel->setText(text);
47 //------------------------------------------------------------------------------
50 //------------------------------------------------------------------------------
51 void vvInfoPanel::setSizeMM(QString text)
53 sizeMMLabel->setText(text);
55 //------------------------------------------------------------------------------
58 //------------------------------------------------------------------------------
59 void vvInfoPanel::setNPixel(QString text)
61 nPixelLabel->setText(text);
63 //------------------------------------------------------------------------------
66 //------------------------------------------------------------------------------
67 void vvInfoPanel::setSizePixel(QString text)
69 sizePixelLabel->setText(text);
71 //------------------------------------------------------------------------------
74 //------------------------------------------------------------------------------
75 void vvInfoPanel::setOrigin(QString text)
77 originLabel->setText(text);
79 //------------------------------------------------------------------------------
82 //------------------------------------------------------------------------------
83 void vvInfoPanel::setSpacing(QString text)
85 spacingLabel->setText(text);
87 //------------------------------------------------------------------------------
90 //------------------------------------------------------------------------------
91 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
97 world += QString::number(x,'f',1) + " ";
98 world += QString::number(y,'f',1) + " ";
99 world += QString::number(z,'f',1) + " ";
101 mouse += QString::number(X,'f',1) + " ";
102 mouse += QString::number(Y,'f',1) + " ";
103 mouse += QString::number(Z,'f',1) + " ";
105 val += QString::number(value);
107 worldPosLabel->setText(world);
108 pixelPosLabel->setText(mouse);
109 valueLabel->setText(val);
111 //------------------------------------------------------------------------------
114 //------------------------------------------------------------------------------
115 void vvInfoPanel::setViews(int window, int view, int slice)
120 viewString = "Sagital, ";
124 viewString = "Coronal, ";
128 viewString = "Axial, ";
133 QString text = viewString;
135 text += "current slice : ";
136 text += QString::number(slice);
143 ULLabel->setText(text);
147 URLabel->setText(text);
151 DLLabel->setText(text);
155 DRLabel->setText(text);
160 //------------------------------------------------------------------------------
163 //------------------------------------------------------------------------------
164 void vvInfoPanel::setMemoryInMb(QString text)
166 memoryUsageLabel->setText("<font color=\"blue\">Memory usage :</font> "+text);
168 //------------------------------------------------------------------------------