X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbcreaMaracasVisuTubeTreeFilter.h;h=f0a090e02fbc89fc7b6243fbfe767a33ec110f42;hb=c68f4e0d9298fe538f87a974947cce470148c60b;hp=c6ee910bab297eac6829b91d1fa1fe3b18cc4440;hpb=8b01430072604956a52213748415d28c87e018a6;p=creaMaracasVisu.git diff --git a/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.h b/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.h index c6ee910..f0a090e 100644 --- a/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.h +++ b/bbtk/src/bbcreaMaracasVisuTubeTreeFilter.h @@ -18,10 +18,58 @@ #include "vtkCellArray.h" #include "vtkProperty.h" #include "vtkLinearTransform.h" +#include "vtkLookupTable.h" +#include "vtkScalarsToColors.h" + + + +class /*VTK_COMMON_EXPORT*/ vtkLookupTableEED : public vtkScalarsToColors + { + public: + // Description: + // Construct with range=[0,1]; and hsv ranges set up for rainbow color table + // (from red to blue). + static vtkLookupTableEED *New(); + + vtkTypeMacro(vtkLookupTableEED,vtkScalarsToColors); + void PrintSelf(ostream& os, vtkIndent indent); + + double *GetRange() { return this->GetTableRange(); }; + void SetRange(double min, double max) { this->SetTableRange(min, max); }; + void SetRange(double rng[2]) { this->SetRange(rng[0], rng[1]); }; + + void SetTableRange(double r[2]); + virtual void SetTableRange(double min, double max); + vtkGetVectorMacro(TableRange,double,2); + + unsigned char *MapValue(double v); + + void GetColor(double x, double rgb[3]); + + void MapScalarsThroughTable2(void *input, unsigned char *output, + int inputDataType, int numberOfValues, + int inputIncrement, int outputIncrement); + + + protected: + + double TableRange[2]; + vtkLookupTableEED(int sze=256, int ext=256); + ~vtkLookupTableEED(); + + + private: + vtkLookupTableEED(const vtkLookupTableEED&); // Not implemented. + void operator=(const vtkLookupTableEED&); // Not implemented. +}; + + + namespace bbcreaMaracasVisu { + class bbcreaMaracasVisu_EXPORT TubeTreeFilter : @@ -49,6 +97,7 @@ class bbcreaMaracasVisu_EXPORT TubeTreeFilter private: std::vector vecVtkActors; void DrawOneTube(int iGeneral,int numPoints, int iTube); + void SetGraphicProperties(); int oldLstSize; //=====