37 #include <QColorDialog>
41 #include "vtkContourWidget.h"
42 #include "vtkOrientedGlyphContourRepresentation.h"
43 #include "vtkImageActorPointPlacer.h"
44 #include "vtkPolyData.h"
46 #include "vtkProperty.h"
62 m_BackgroundColor(Qt::black),
64 m_ReEditContourMode(false),
65 m_NavigationDockWidget(0)
111 SIGNAL( UpdateContourRepresentationProperties() ),
131 linecolor.
getRgbF(&rl, &gl, &bl);
134 nodecolor.
getRgbF(&rn, &gn, &bn);
137 activenodecolor.
getRgbF(&ra, &ga, &ba);
143 static_cast< double >( rl ),
144 static_cast< double >( gl ),
145 static_cast< double >( bl ) );
148 static_cast< double >( rn ),
149 static_cast< double >( gn ),
150 static_cast< double >( bn ) );
152 static_cast< double >( ra ),
153 static_cast< double >( ga ),
154 static_cast< double >( ba ) );
181 settings.
beginGroup(
"QGoTabImageViewElementBase");
197 settings.
beginGroup(
"QGoTabImageViewElementBase");
217 this,
tr(
"Choose Background Color") );
238 std::vector< vtkSmartPointer< vtkContourWidget > >::iterator it =
263 vtkPolyData *contour =
274 vtkProperty *contour_property = vtkProperty::New();
275 contour_property->SetRepresentationToWireframe();
276 contour_property->SetColor(r, g, b);
277 contour_property->SetOpacity(a);
281 contour->GetBounds(bounds);
300 vtkPolyData *contour_nodes = vtkPolyData::New();
304 vtkPolyData *contour_copy = vtkPolyData::New();
305 contour_copy->ShallowCopy(contour);
308 std::vector< vtkActor * > contour_actor =
312 contour_copy->Delete();
313 contour_property->Delete();
373 vtkPolyData *c_nodes = NULL;
395 c_nodes->GetPoint(0, p);
436 QIcon::Normal, QIcon::Off);
Abstract class for one tab element in GoFigure2.
virtual void SetBackgroundColorToImageViewer()=0
virtual void SetColor(const bool &iColor)
virtual void TakeSnapshot()=0
std::vector< vtkSmartPointer< vtkContourWidget > > m_ContourWidget
void setIcon(const QIcon &icon)
virtual int * GetImageCoordinatesFromWorldCoordinates(double pos[3])=0
void ReEditContour(const unsigned int &iId)
Re-edit the iId^th contour.
QColor m_ActiveNodesColor
MultiIndexContainerType::template index< TraceID >::type::iterator MultiIndexContainerTraceIDIterator
MultiIndexContainerType m_Container
Trace Contaienr.
ContourContainer * m_ContourContainer
void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a) const
QString tr(const char *sourceText, const char *disambiguation, int n)
void setValue(const QString &key, const QVariant &value)
QString fromUtf8(const char *str, int size)
QAction * m_TakeSnapshotAction
virtual void ValidateContour()
Validate contour traced in the ContourWidget.
static int ComputeDirectionFromContour(vtkPolyData *iContour)
Returns the direction of a given contour vtkPolyData. This static method is supposed to be used when ...
Wraps a boost::multi_index_container of ContourMeshStructure. This class is specialized for the means...
void ActivateManualSegmentationEditor(const bool &iActivate)
Activate the manual segmentation editor (ContourWidget).
void addPixmap(const QPixmap &pixmap, Mode mode, State state)
std::vector< QAction * > m_ToolsActions
void ReinitializeContour()
Reinitialize contour in the ContourWidget (delete contour, and restart with no contours.
virtual void CreateManualSegmentationdockWidget()
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, QFlags< QColorDialog::ColorDialogOption > options)
virtual void GetBackgroundColorFromImageViewer()=0
QVariant value(const QString &key, const QVariant &defaultValue) const
virtual void ReadSettings()
Read Settings.
void setStatusTip(const QString &statusTip)
virtual void WriteSettings()
Write Settings.
void ChangeBackgroundColor()
Change the background color.
Wraps a boost::multi_index_container of ContourMeshStructure. This class is specialized for the means...
MeshContainer * m_MeshContainer
virtual void CreateToolsActions()
QGoContourManualSegmentationWidget * m_ManualSegmentationWidget
std::vector< vtkSmartPointer< vtkOrientedGlyphContourRepresentation > > m_ContourRepresentation
virtual void SetSlice(int iDir, int *iIdx)=0
QGoTabImageViewElementBase(QWidget *parent=0)
Constructor.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual std::vector< vtkActor * > AddContour(vtkPolyData *dataset, vtkProperty *property=NULL)=0
virtual ~QGoTabImageViewElementBase()
Destructor.
void ChangeContourRepresentationProperty()
Change contour representation property (color, line width, etc.)
void beginGroup(const QString &prefix)