36 #include <QVBoxLayout> 43 #include "sscConfig.h" 55 this->setFocusPolicy(Qt::StrongFocus);
58 QVBoxLayout* vtopLayout =
new QVBoxLayout;
60 vtopLayout->setMargin(0);
61 vtopLayout->addStretch();
62 this->setLayout(vtopLayout);
71 this->setObjectName(
"preferences_performance_widget");
84 int renderingInterval =
settings()->
value(
"renderingInterval").toInt();
86 QLabel* renderingIntervalLabel =
new QLabel(tr(
"Rendering interval"));
96 this->renderingIntervalSlot(renderingInterval);
98 double Mb = pow(10.0,6);
100 double maxRenderSize =
settings()->
value(
"View3D/maxRenderSize").toDouble(&ok);
102 maxRenderSize = 10 * Mb;
106 double stillUpdateRate =
settings()->
value(
"stillUpdateRate").value<
double>();
108 "<p>Still Update Rate in vtkRenderWindow. " 109 "Increasing the value may improve rendering speed " 110 "at the cost of render quality.</p> " 111 "Generally raycast rendering requires this to be low (0.001), " 112 "while texture based rendering requires it to be high (5-10)." 113 "<p>Restart needed.</p>",
114 stillUpdateRate,
DoubleRange(0.0001, 20, 0.0001), 4, QDomNode());
122 "Select 3D visualization method for images",
124 this->getAvailableVisualizers(),
126 m3DVisualizer->setDisplayNames(this->getAvailableVisualizerDisplayNames());
128 bool useGPU2DRender =
settings()->
value(
"View2D/useGPU2DRendering").toBool();
132 "the software-based one, if available.</p>" 133 "<p>This enables multiple volume rendering in 2D.<p>");
135 bool linearInterpolationIn2D =
settings()->
value(
"View2D/useLinearInterpolationIn2DRendering").toBool();
139 "instead of nearest.</p>" 140 "<p>Requires restart.<p>");
142 bool optimizedViews =
settings()->
value(
"optimizedViews").toBool();
146 "<p>This speeds up render on some platforms, still experimental.<p>");
148 bool useGPU3DDepthPeeling =
settings()->
value(
"View3D/depthPeeling").toBool();
155 mMainLayout->addWidget(renderingIntervalLabel, 0, 0);
174 static QStringList getAvailableVisualizers();
175 static std::map<QString, QString> getAvailableVisualizerDisplayNames();
177 void PerformanceTab::renderingIntervalSlot(
int interval)
182 QStringList PerformanceTab::getAvailableVisualizers()
185 retval <<
"vtkVolumeTextureMapper3D";
186 retval <<
"vtkGPUVolumeRayCastMapper";
187 #ifdef CX_BUILD_MEHDI_VTKMULTIVOLUME 188 retval <<
"vtkOpenGLGPUMultiVolumeRayCastMapper";
189 #endif //CX_BUILD_MEHDI_VTKMULTIVOLUME 194 std::map<QString, QString> PerformanceTab::getAvailableVisualizerDisplayNames()
196 std::map<QString, QString> names;
197 names[
"vtkVolumeTextureMapper3D"] =
"Texture (single volume)";
198 names[
"vtkGPUVolumeRayCastMapper"] =
"Raycast GPU (single volume)";
199 names[
"vtkOpenGLGPUMultiVolumeRayCastMapper"] =
"Mehdi Raycast GPU (multi volume)";
PreferenceTab(QWidget *parent=0)
std::string toString(T const &value)
converts any type to a string
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.