36 #include <QVBoxLayout>
43 #include "sscConfig.h"
58 QVBoxLayout* vtopLayout =
new QVBoxLayout;
60 vtopLayout->setMargin(0);
61 vtopLayout->addStretch();
62 this->setLayout(vtopLayout);
82 int renderingInterval =
settings()->
value(
"renderingInterval").toInt();
84 QLabel* renderingIntervalLabel =
new QLabel(tr(
"Rendering interval"));
94 this->renderingIntervalSlot(renderingInterval);
96 double Mb = pow(10.0,6);
98 double maxRenderSize =
settings()->
value(
"View3D/maxRenderSize").toDouble(&ok);
100 maxRenderSize = 10 * Mb;
104 double stillUpdateRate =
settings()->
value(
"stillUpdateRate").value<
double>();
106 "<p>Still Update Rate in vtkRenderWindow. "
107 "Increasing the value may improve rendering speed "
108 "at the cost of render quality.</p> "
109 "Generally raycast rendering requires this to be low (0.001), "
110 "while texture based rendering requires it to be high (5-10)."
111 "<p>Restart needed.</p>",
112 stillUpdateRate,
DoubleRange(0.0001, 20, 0.0001), 4, QDomNode());
120 "Select 3D visualization method for images",
121 settings()->value(
"View3D/ImageRender3DVisualizer").toString(),
122 this->getAvailableVisualizers(),
124 m3DVisualizer->setDisplayNames(this->getAvailableVisualizerDisplayNames());
126 bool useGPU2DRender =
settings()->
value(
"useGPU2DRendering").toBool();
130 "the software-based one, if available.</p>"
131 "<p>This enables multiple volume rendering in 2D.<p>");
133 bool optimizedViews =
settings()->
value(
"optimizedViews").toBool();
137 "<p>This speeds up render on some platforms, still experimental.<p>");
142 mMainLayout->addWidget(renderingIntervalLabel, 0, 0);
159 static QStringList getAvailableVisualizers();
160 static std::map<QString, QString> getAvailableVisualizerDisplayNames();
162 void PerformanceTab::renderingIntervalSlot(
int interval)
167 QStringList PerformanceTab::getAvailableVisualizers()
170 retval <<
"vtkVolumeTextureMapper3D";
171 retval <<
"vtkGPUVolumeRayCastMapper";
172 #ifdef CX_BUILD_MEHDI_VTKMULTIVOLUME
173 retval <<
"vtkOpenGLGPUMultiVolumeRayCastMapper";
174 #endif //CX_BUILD_MEHDI_VTKMULTIVOLUME
179 std::map<QString, QString> PerformanceTab::getAvailableVisualizerDisplayNames()
181 std::map<QString, QString> names;
182 names[
"vtkVolumeTextureMapper3D"] =
"Texture (single volume)";
183 names[
"vtkGPUVolumeRayCastMapper"] =
"Raycast GPU (single volume)";
184 names[
"vtkOpenGLGPUMultiVolumeRayCastMapper"] =
"Mehdi Raycast GPU (multi volume)";
PreferenceTab(QWidget *parent=0)
Utility class for describing a bounded numeric range.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
void setValue(const QString &key, const QVariant &value)
Settings * settings()
Shortcut for accessing the settings instance.
static StringPropertyPtr initialize(const QString &uid, QString name, QString help, QString value, QStringList range, QDomNode root=QDomNode())
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())