1 /*=========================================================================
4 Module: $RCSfile: vvInfoPanel.cxx,v $
6 Date: $Date: 2010/01/06 13:31:57 $
7 Version: $Revision: 1.1 $
8 Author : Pierre Seroul (pierre.seroul@gmail.com)
11 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
12 CREATIS-LRMN http://www.creatis.insa-lyon.fr
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation, version 3 of the License.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 =========================================================================*/
30 #include "vvInfoPanel.h"
32 void vvInfoPanel::setFileName(QString text)
35 imageLabel->setText("..." + text.right(27));
37 imageLabel->setText(text);
40 void vvInfoPanel::setDimension(QString text)
42 dimensionLabel->setText(text);
45 void vvInfoPanel::setSizeMM(QString text)
47 sizeMMLabel->setText(text);
50 void vvInfoPanel::setNPixel(QString text)
52 nPixelLabel->setText(text);
55 void vvInfoPanel::setSizePixel(QString text)
57 sizePixelLabel->setText(text);
60 void vvInfoPanel::setOrigin(QString text)
62 originLabel->setText(text);
65 void vvInfoPanel::setSpacing(QString text)
67 spacingLabel->setText(text);
70 void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
77 world += QString::number(x,'f',1) + " ";
78 world += QString::number(y,'f',1) + " ";
79 world += QString::number(z,'f',1) + " ";
81 mouse += QString::number(X,'f',1) + " ";
82 mouse += QString::number(Y,'f',1) + " ";
83 mouse += QString::number(Z,'f',1) + " ";
85 val += QString::number(value);
87 worldPosLabel->setText(world);
88 pixelPosLabel->setText(mouse);
89 valueLabel->setText(val);
93 void vvInfoPanel::setViews(int window, int view, int slice)
100 viewString = "Sagital, ";
105 viewString = "Coronal, ";
110 viewString = "Axial, ";
115 QString text = viewString;
118 text += "current slice : ";
119 text += QString::number(slice);
130 ULLabel->setText(text);
135 URLabel->setText(text);
140 DLLabel->setText(text);
145 DRLabel->setText(text);