15 #include <QVBoxLayout> 22 #include "sscConfig.h" 34 this->setFocusPolicy(Qt::StrongFocus);
37 QVBoxLayout* vtopLayout =
new QVBoxLayout;
39 vtopLayout->setMargin(0);
40 vtopLayout->addStretch();
41 this->setLayout(vtopLayout);
50 this->setObjectName(
"preferences_performance_widget");
63 int renderingInterval =
settings()->
value(
"renderingInterval").toInt();
65 QLabel* renderingIntervalLabel =
new QLabel(tr(
"Rendering interval"));
75 this->renderingIntervalSlot(renderingInterval);
77 double Mb = pow(10.0,6);
79 double maxRenderSize =
settings()->
value(
"View3D/maxRenderSize").toDouble(&ok);
81 maxRenderSize = 10 * Mb;
85 double stillUpdateRate =
settings()->
value(
"stillUpdateRate").value<
double>();
87 "<p>Still Update Rate in vtkRenderWindow. " 88 "Increasing the value may improve rendering speed " 89 "at the cost of render quality.</p> " 90 "Generally raycast rendering requires this to be low (0.001), " 91 "while texture based rendering requires it to be high (5-10)." 92 "<p>Restart needed.</p>",
93 stillUpdateRate,
DoubleRange(0.0001, 20, 0.0001), 4, QDomNode());
101 "Select 3D visualization method for images",
102 settings()->value(
"View3D/ImageRender3DVisualizer").toString(),
103 this->getAvailableVisualizers(),
105 m3DVisualizer->setDisplayNames(this->getAvailableVisualizerDisplayNames());
107 bool useGPU2DRender =
settings()->
value(
"View2D/useGPU2DRendering").toBool();
111 "the software-based one, if available.</p>" 112 "<p>This enables multiple volume rendering in 2D.<p>");
114 bool linearInterpolationIn2D =
settings()->
value(
"View2D/useLinearInterpolationIn2DRendering").toBool();
118 "instead of nearest.</p>" 119 "<p>Requires restart.<p>");
121 bool optimizedViews =
settings()->
value(
"optimizedViews").toBool();
125 "<p>This speeds up render on some platforms, still experimental.<p>");
127 bool useGPU3DDepthPeeling =
settings()->
value(
"View3D/depthPeeling").toBool();
134 mMainLayout->addWidget(renderingIntervalLabel, 0, 0);
153 static QStringList getAvailableVisualizers();
154 static std::map<QString, QString> getAvailableVisualizerDisplayNames();
156 void PerformanceTab::renderingIntervalSlot(
int interval)
161 QStringList PerformanceTab::getAvailableVisualizers()
164 retval <<
"vtkVolumeTextureMapper3D";
165 retval <<
"vtkGPUVolumeRayCastMapper";
166 #ifdef CX_BUILD_MEHDI_VTKMULTIVOLUME 167 retval <<
"vtkOpenGLGPUMultiVolumeRayCastMapper";
168 #endif //CX_BUILD_MEHDI_VTKMULTIVOLUME 173 std::map<QString, QString> PerformanceTab::getAvailableVisualizerDisplayNames()
175 std::map<QString, QString> names;
176 names[
"vtkVolumeTextureMapper3D"] =
"Texture (single volume)";
177 names[
"vtkGPUVolumeRayCastMapper"] =
"Raycast GPU (single volume)";
178 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())
Namespace for all CustusX production code.