<rect>
<x>0</x>
<y>0</y>
- <width>273</width>
- <height>417</height>
+ <width>281</width>
+ <height>425</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
</property>
</widget>
</item>
+ <item row="16" column="0">
+ <widget class="QLabel" name="memoryUsageLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600; color:#0000ff;">Memory usage: </span></p></body></html></string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+ ======================================================================-====*/
#include <QtGui>
#include <Qt>
#include "vvInfoPanel.h"
+#include "clitkMemoryUsage.h"
+//------------------------------------------------------------------------------
void vvInfoPanel::setFileName(QString text)
{
if (text.size() > 30)
else
imageLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setDimension(QString text)
{
dimensionLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setSizeMM(QString text)
{
sizeMMLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setNPixel(QString text)
{
nPixelLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setSizePixel(QString text)
{
sizePixelLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setOrigin(QString text)
{
originLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setSpacing(QString text)
{
spacingLabel->setText(text);
}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
void vvInfoPanel::setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value)
{
QString world = "";
pixelPosLabel->setText(mouse);
valueLabel->setText(val);
}
+//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
void vvInfoPanel::setViews(int window, int view, int slice)
{
QString viewString;
}
}
}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvInfoPanel::setMemoryInMb(QString text)
+{
+ memoryUsageLabel->setText("Memory usage: "+text);
+}
+//------------------------------------------------------------------------------
+
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+ ======================================================================-====*/
#ifndef vvInfoPanel_h
#define vvInfoPanel_h
#include <iostream>
class vvInfoPanel : public QWidget, private Ui::vvInfoPanel
{
- Q_OBJECT
-
-public:
- vvInfoPanel(QWidget * parent=0):QWidget(parent) {
- setupUi(this);
- }
- ~vvInfoPanel() {}
-
- void setFileName(QString text);
- void setSizeMM(QString text);
- void setOrigin(QString text);
- void setSpacing(QString text);
- void setNPixel(QString text);
- void setDimension(QString text);
- void setSizePixel(QString text);
- void setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value);
- void setViews(int window, int view, int slice);
+ Q_OBJECT
+
+ public:
+ vvInfoPanel(QWidget * parent=0):QWidget(parent) {
+ setupUi(this);
+ }
+ ~vvInfoPanel() {}
+
+ void setFileName(QString text);
+ void setSizeMM(QString text);
+ void setOrigin(QString text);
+ void setSpacing(QString text);
+ void setNPixel(QString text);
+ void setDimension(QString text);
+ void setSizePixel(QString text);
+ void setCurrentInfo(int visibility, double x, double y, double z, double X, double Y, double Z, double value);
+ void setViews(int window, int view, int slice);
+ void setMemoryInMb(QString text);
public slots:
if (!CLITK_EXPERIMENTAL)
menuExperimental->menuAction()->setVisible(false);
+
+
+ QTimer * timerMemory = new QTimer(this);
+ //timerMemory->setInterval(5);
+ connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage()));
+ timerMemory->start(5000);
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvMainWindow::UpdateMemoryUsage()
+{
+ clitk::PrintMemory(true);
+ ImageInfoChanged();
}
//------------------------------------------------------------------------------
infoPanel->setSpacing(GetVectorDoubleAsString(inputSpacing));
infoPanel->setNPixel(QString::number(NPixel)+" ("+inputSizeInBytes+")");
+ infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" Mb");
+
+
landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(),
mSlicerManagers[index]->GetSlicer(0)->GetImage()->GetVTKImages().size());
landmarksPanel->SetCurrentPath(mInputPathName.toStdString());
InitDisplay();
}
}
+ ImageInfoChanged();
}
//------------------------------------------------------------------------------
qApp->processEvents();
// End
+ ImageInfoChanged();
return slicer_manager;
}
//------------------------------------------------------------------------------
#include "vvToolManager.h"
#include "vvConstants.h"
#include "vvMesh.h"
+#include "clitkMemoryUsage.h"
class vvSlicerManager;
class vvHelpDialog;
mFrameRate = rate;
}
void UpdateRenderWindows();
+ void UpdateMemoryUsage();
private: