37 #include "QColorDialog"
39 #include "vtkLookupTable.h"
40 #include "vtkScalarBarActor.h"
42 #include "vtkTextProperty.h"
43 #include "vtkRenderer.h"
44 #include "vtkRendererCollection.h"
45 #include "vtkRenderWindow.h"
54 this->
Renderer = vtkSmartPointer< vtkRenderer >::New();
56 vtkRenderWindow *renwin = this->
QvtkWidget->GetRenderWindow();
59 this->
LUTActor = vtkSmartPointer< vtkScalarBarActor >::New();
61 this->
LUTActor->SetOrientationToHorizontal();
64 this->
LUTActor->SetPosition(0.1, 0.1);
95 if ( dlg.
exec() == QDialog::Accepted )
113 LUTDialog->
resize(321, 183);
139 std::vector< std::string > lut_names =
143 for (; k < lut_names.size(); k++ )
171 | QDialogButtonBox::Ok);
180 LUTDialog, SLOT(
accept() ) );
182 LUTDialog, SLOT(
reject() ) );
196 if ( ( idx >= N ) || ( idx < 0 ) )
198 qWarning() <<
"QGoLUTDialog idx is out of range";
211 hsv[0] = color.
hueF();
218 hsv[0] = color.
hueF();
231 this->
QvtkWidget->GetRenderWindow()->Render();
static vtkLookupTable * GetLookupTable(const int &iIndex)
Get the indexed lookup table.
void setContentsMargins(int left, int top, int right, int bottom)
void setModal(bool modal)
QGoLUTDialog(QWidget *parent=0)
Constructor.
vtkSmartPointer< vtkScalarBarActor > LUTActor
QDialogButtonBox * ButtonBox
static vtkLookupTable * GetHSVBasedLookupTable(double iRGB[3])
Get one HSV based lookup table.
void setEditable(bool editable)
vtkSmartPointer< vtkRenderer > Renderer
QString tr(const char *sourceText, const char *disambiguation, int n)
static vtkLookupTable * GetBWLookupTable(void)
Get the BW lookup table.
void insertItem(int index, const QString &text, const QVariant &userData)
virtual ~QGoLUTDialog()
Destructor.
QString fromStdString(const std::string &str)
QString fromUtf8(const char *str, int size)
vtkLookupTable * GetLookupTable()
get the selected look up table
virtual void addItem(QLayoutItem *item)
void setText(const QString &)
void ChangeLookupTable(const int &)
Change look up table.
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, QFlags< QColorDialog::ColorDialogOption > options)
qreal saturationF() const
QHBoxLayout * HorizontalLayout
QSpacerItem * HorizontalSpacer
void setCurrentIndex(int index)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setupUi(QDialog *LUTDialog)
QVBoxLayout * VerticalLayout
QHBoxLayout * HorizontalLayout_2
void setSpacing(int spacing)
void addLayout(QLayout *layout, int stretch)
static std::vector< std::string > GetAvailableLookupTables(void)
Get the available lookup table.