40 #include "vtkLookupTable.h"
41 #include "vtkEventQtSlotConnect.h"
42 #include "vtkRenderWindow.h"
43 #include "vtkRendererCollection.h"
44 #include "vtkImageData.h"
45 #include "vtkTextProperty.h"
46 #include "vtkImageExtractComponents.h"
47 #include "vtkProperty.h"
48 #include "vtkContourWidget.h"
49 #include "vtkOrientedGlyphContourRepresentation.h"
50 #include "vtkImageActorPointPlacer.h"
56 #include <QColorDialog>
57 #include <QMessageBox>
69 vtkSmartPointer< vtkOrientedGlyphContourRepresentation >::New() );
75 vtkSmartPointer< vtkContourWidget >::New() );
84 std::pair< QGoDockWidgetStatus *, QDockWidget * >(
89 LookupTableAction->
setStatusTip(
tr(
" Change the associated lookup table") );
93 QIcon::Normal, QIcon::Off);
94 LookupTableAction->
setIcon(luticon);
107 QIcon::Normal, QIcon::Off);
108 ScalarBarAction->
setIcon(scalarbaricon);
165 iParent->
resize(800, 800);
211 double r(0.), g(0.), b(0.);
223 vtkLookupTable *lut = vtkLookupTable::New();
226 tr(
"Choose one look-up table") ) );
267 vtkImageActorPointPlacer *point_placer = vtkImageActorPointPlacer::New();
271 point_placer->Delete();
290 std::vector< vtkActor * >
330 double r(0.), g(0.), b(0.);
336 this,
tr(
"Choose Background Color") );
std::vector< vtkActor * > AddContour(vtkPolyData *dataset, vtkProperty *property=NULL)
GoFigure::TabDimensionType GetTabDimensionType() const
Get the dimension type of the underlying data set.
void SetBackgroundColorToImageViewer()
void SetImage(vtkImageData *iImage)
Set the image to displaid.
QGoTabImageView2D(QWidget *parent=0)
void setSeparator(bool b)
void setRgbF(qreal r, qreal g, qreal b, qreal a)
void fill(const QColor &color)
std::vector< vtkSmartPointer< vtkContourWidget > > m_ContourWidget
void setupUi(QWidget *parent)
std::list< QGoDockWidgetStatusPair > m_DockWidgetList
void GetBackgroundColor(double &r, double &g, double &b)
Returns used background color by viewers.
virtual ~QGoTabImageView2D()
void setIcon(const QIcon &icon)
virtual void AddActor(const int &iId, vtkActor *iActor)
void ShowScalarBar(const bool &)
Show/hide the scalar bar in the collection.
vtkSmartPointer< vtkImageData > m_Image
void PanMode()
Use the pan interactor style.
void ShowOneChannel(int iChannel)
virtual void RemoveActorFromViewer(const int &iId, vtkActor *iActor)
QString tr(const char *sourceText, const char *disambiguation, int n)
virtual void SetSlice(int iDir, int *iIdx)
void ChangeBackgroundColor()
void GetBackgroundColorFromImageViewer()
QAction * m_BackgroundColorAction
void SetLookupTable(vtkLookupTable *iLut)
Set the lookup table in the collection.
virtual void DisplayActorInViewer(const int &iId, vtkActor *iActor)
void CreateModeToolBar(QMenu *iMenu, QToolBar *iToolBar)
QString fromUtf8(const char *str, int size)
virtual void PanInteractorBehavior(bool)
Mouse interaction style allows user to pan volume with all buttons.
virtual void CreateModeToolBar(QMenu *iMenu, QToolBar *iToolBar)
vtkLookupTable * GetLookupTable()
get the selected look up table
void ZoomMode()
Use the zoom interactor style.
QString SnapshotViewXY(const GoFigure::FileType &iType, const QString &iBaseName=tr("Snapshot"))
void addPixmap(const QPixmap &pixmap, Mode mode, State state)
virtual void DefaultInteractorBehavior(bool)
Mouse interaction style set as default.
void setCentralWidget(QWidget *widget)
virtual void Update()
Update the rendering of the tab.
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, QFlags< QColorDialog::ColorDialogOption > options)
std::list< QGoToolBarStatus * > m_ToolBarList
virtual void ReadSettings()
Read Settings.
QVTKInteractor * GetInteractor(const int &i=0)
Returns the interactor for one given view.
Abstract class for representing one tab element which contains 2D or 3D image (without any temporal c...
virtual void ReadSettings()
Read Settings.
void retranslateUi(QWidget *parent)
virtual std::vector< vtkActor * > AddContour(vtkPolyData *iDataset, vtkProperty *iProperty=NULL)
Add contour with given property into the visualization.
void setStatusTip(const QString &statusTip)
int * GetImageCoordinatesFromWorldCoordinates(double pos[3])
Get Image Coordinates from World Coordinates.
virtual void WriteSettings()
Write Settings.
int * GetImageCoordinatesFromWorldCoordinates(double pos[3])
QGoNavigationDockWidget * m_NavigationDockWidget
std::vector< QAction * > m_ViewActions
virtual void WriteSettings()
Write Settings.
void ShowScalarBar(const bool &)
void SetImageToImageViewer(vtkImageData *image)
std::vector< vtkSmartPointer< vtkOrientedGlyphContourRepresentation > > m_ContourRepresentation
Widget to visualize a 2D image (represented as vtkImageData).
vtkImageActor * GetImageActor(const int &iId)
Get the image actor.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void ZoomInteractorBehavior(bool)
Mouse interaction style allows user to zoom in/out volume with all buttons.
void SetBackgroundColor(const double &r, const double &g, const double &b)
Set background color for all views.
void ShowAllChannels(bool iChecked)
QGoImageView2D * m_ImageView
virtual void RemoveActor(const int &iId, vtkActor *iActor)
void DefaultMode()
Use the default interactor style.
QGoToolBarStatus * m_ModeToolBar