X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolSegmentation.h;h=84d99b5dbca4c1d0354ef791d42519bc44cbc1e9;hb=6f76702afbff9ce0af70f887cd8a4e4d4bdd173a;hp=7b8bb8c49ae297d73cb659d780f8079ffc4bfc45;hpb=8b313bf2cfa92434e47f20e3e30566b7a27e70e7;p=clitk.git diff --git a/vv/vvToolSegmentation.h b/vv/vvToolSegmentation.h index 7b8bb8c..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,21 +44,34 @@ 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: // virtual void closeEvent(QCloseEvent *event); Ui::vvToolSegmentation ui; QSharedPointer mRefMaskActor; - vvImage::Pointer mMaskImage; + 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 //------------------------------------------------------------------------------