X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolSegmentation.h;h=84d99b5dbca4c1d0354ef791d42519bc44cbc1e9;hb=0c99a00f9dfb4aa65dca28a55bc7c768b42f5559;hp=21cdaf65215477824aa83b215e7fc77c855a98ad;hpb=916bb609956d9a3aa8e642dccd3fd8c46261b684;p=clitk.git diff --git a/vv/vvToolSegmentation.h b/vv/vvToolSegmentation.h index 21cdaf6..84d99b5 100644 --- a/vv/vvToolSegmentation.h +++ b/vv/vvToolSegmentation.h @@ -25,6 +25,8 @@ #include "vvROIActor.h" #include "ui_vvToolSegmentation.h" +#include "vtkLookupTable.h" + //------------------------------------------------------------------------------ class vvToolSegmentation: public vvToolWidgetBase, @@ -42,13 +44,17 @@ class vvToolSegmentation: void OpenBinaryImage(); void Erode(); void Dilate(); - void UpdateAndRender(); + void Labelize(); + void RemoveLabel(); + void UpdateAndRenderNewMask(); //----------------------------------------------------- public slots: virtual void apply(); - virtual void keyPressEvent(QKeyEvent * event); + bool eventFilter(QObject *object, QEvent *event); virtual bool close(); + virtual void MousePositionChanged(int slicer); + // virtual void keyPressEvent(QKeyEvent * event); // virtual void reject(); protected: @@ -56,9 +62,16 @@ class vvToolSegmentation: Ui::vvToolSegmentation ui; QSharedPointer mRefMaskActor; QSharedPointer mCurrentMaskActor; + std::vector > mCurrentCCLActors; vvImage::Pointer mRefMaskImage; vvImage::Pointer mCurrentMaskImage; + vvImage::Pointer mCurrentCCLImage; int mKernelValue; + vtkSmartPointer mDefaultLUTColor; + enum { Mode_Default, Mode_CCL}; + int mCurrentMode; + + QSharedPointer CreateMaskActor(vvImage::Pointer image, int i, int colorID, bool BGMode=false); }; // end class vvToolSegmentation //------------------------------------------------------------------------------