85 #include <QSpacerItem>
86 #include <QColorDialog>
89 #include "vtkLookupTable.h"
90 #include "vtkImageAccumulate.h"
91 #include "vtkImageData.h"
92 #include "vtkPointData.h"
93 #include "vtkPiecewiseFunction.h"
102 const std::vector<double>& iColor,
103 std::vector<int> iLUTParameters,
142 QString style =
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop: 0 black, stop: 1 rgb(%1, %2, %3)); border-radius: 4px;";
187 m_MinSlider->
setStyleSheet(
"QSlider::groove:horizontal {border: 1px solid #bbb;background: rgba(0, 0, 0, 0);height: 4px;position: absolute; right: 10px;left: 10px; }QSlider::handle:horizontal {image: url(/home/nr52/gitroot/gofigure/Resources/widget/arrow_up.png);width: 20px;height: 6px;margin-top: -2px;margin-bottom: -2px; right: -10px; left:-10px; border: 1px solid black; background: rgba(255, 255, 255, 200); border-radius: 4px;}QSlider::sub-page:horizontal {background: #909090;border: 1px solid black;}QSlider::add-page:horizontal {background: rgba(0, 0, 0, 0);border: 1px solid black;}");
194 m_MaxSlider->
setStyleSheet(
"QSlider::groove:horizontal {border: 1px solid #bbb;background: rgba(0, 0, 0, 0);height: 4px;position: absolute; right: 10px;left: 10px; }QSlider::handle:horizontal {image: url(/home/nr52/gitroot/gofigure/Resources/widget/arrow_down.png);width: 20px;height: 6px;margin-top: -2px;margin-bottom: -2px; right: -10px; left:-10px; border: 1px solid black; background: rgba(255, 255, 255, 200); border-radius: 4px;}QSlider::sub-page:horizontal {background: rgba(0, 0, 0, 0);border: 1px solid black;}QSlider::add-page:horizontal {background: #909090;border: 1px solid black;}");
197 new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Minimum);
200 new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Minimum);
212 shadeVerticalLayout->
addLayout(m_TFWidget_layout);
216 shadeHorizontalLayout->
addItem(spacerShade1);
217 shadeHorizontalLayout->
addLayout(shadeVerticalLayout);
218 shadeHorizontalLayout->
addItem(spacerShade2);
264 QString style5 =
"color: black; border: 1px solid rgb(0, 0, 0); background-color: rgba(255, 255, 255, 150); border-radius: 4px;";
269 QString style2 =
"color: white; border: 1px solid rgb(0, 0, 0); background-color: rgba(0, 0, 0, 150); border-radius: 4px;";
274 QString style3 =
"border: 1px solid rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); border-radius: 4px;";
277 connect(tfoCB, SIGNAL(clicked(
bool)),
m_TFWidget, SIGNAL(enableOpacityTF(
bool)));
301 connect(ResetLUTPushButton, SIGNAL(pressed()),
this, SLOT(
ResetLUT()));
322 int ope = pow(-1, side + 1);
328 qreal temp = log(value);
329 gamma_value = pow(temp, ope);
351 AddPoints(
const std::map< unsigned int, unsigned int>& iPoints)
376 std::map< unsigned int, unsigned int>::const_iterator it0;
377 std::map< unsigned int, unsigned int>::const_iterator it255;
385 height*(1-(qreal)(it0->second)/
m_Max));
415 int x_range = iHistogram->GetOutput()->GetNumberOfPoints();
417 vtkDataArray* scalars = iHistogram->GetOutput()->GetPointData()->GetScalars();
419 double* range = iHistogram->GetOutput()->GetScalarRange();
423 for(
int i=0; i<x_range; ++i)
426 value = scalars->GetTuple1(i);
427 histogram.
push_back(log(value)/log(range[1]));
474 QString style =
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop: 0 black, stop: 1 rgb(%1, %2, %3)); border-radius: 4px;";
496 std::map< unsigned int, unsigned int> pointsVector;
517 int numberOfPoints = iPoints.
size();
519 if(numberOfPoints>
m_Max)
521 qDebug() <<
"Too many points: " << numberOfPoints <<
" points";
525 for(
int i=0; i<numberOfPoints; ++i)
527 unsigned int x = (iPoints.
at(i).x())*
m_Max/width;
528 unsigned int y = (1-(iPoints.
at(i).y())/height)*
m_Max;
546 for(
int i=0; i<numberOfPoints; ++i)
573 QString style =
"background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop: 0 black, stop: 1 rgb(%1, %2, %3)); border-radius: 4px;";
void addSpacerItem(QSpacerItem *spacerItem)
void setBlueF(qreal blue)
const char * name() const
void setOrientation(Qt::Orientation)
void setGreenF(qreal green)
virtual void addItem(QLayoutItem *item)
void setObjectName(const QString &name)
void setMargin(int margin)
bool blockSignals(bool block)
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, QFlags< QColorDialog::ColorDialogOption > options)
const T & at(int i) const
void push_back(const T &value)
void setAlphaF(qreal alpha)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int compare(const QString &other) const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void setSpacing(int spacing)
void addLayout(QLayout *layout, int stretch)