#ifndef __WX__MPR__BASE__DATA__H
#define __WX__MPR__BASE__DATA__H
-#include <vtkCommand.h>
+/*#include <vtkCommand.h>
#include "vtkRenderWindow.h"
#include <vtkVolumeRayCastMapper.h>
-#include "vtkImageActor.h"
+
#include "vtkProp.h"
-#include "vtkActor.h"
-#include "vtkPolyDataMapper.h"
+
+
#include "vtkStripper.h"
#include <vtkGlyph3D.h>
#include "vtkLODActor.h"
#include <vtkMarchingCubes.h>
#include <vtkClipPolyData.h>
-#include "vtkOutlineFilter.h"
+
#include <vtkPiecewiseFunction.h>
-#include <vtkColorTransferFunction.h>
+
#include <vtkVolume.h>
#include <vtkVolumeProperty.h>
#include <vtkVolumeRayCastMapper.h>
#include <vtkVolumeRayCastCompositeFunction.h>
-#include <vtkBoxWidget.h>
+#include <vtkBoxWidget.h>*/
+
-#include "vtkImageData.h"
-#include "vtkLookupTable.h"
+
+//#include "vtkLookupTable.h"
//#include "vtkImageActor.h"
-#include <vtkImageMapToColors.h>
-#include <vtkPointWidget.h>
-#include "marImageData.h"
+//#include <vtkPointWidget.h>
+
+
//#include "./pPlotter/HistogramDialog.h"
-
+#include "vtkTransform.h"
#include "marTypes.h"
//------------------------------------------------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
-class creaMaracasVisu_EXPORT vtkBaseData {
-public:
- vtkBaseData();
- virtual ~vtkBaseData();
- vtkImageData* GetImageData();
- marImageData* GetMarImageData();
- void SetMarImageData(marImageData *marimagedata);
- virtual void Configure();
- double GetZ();
- void SetZ(double z);
-
- int GetT();
- void SetT(double t);
-
-protected:
- marImageData *_marImageData;
- double _z;
- int _t;
-};
-
+#include "vtkBaseData.h"
+//#include "boxSurfaceObserver.h"
//------------------------------------------------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
-class creaMaracasVisu_EXPORT vtkMPR3DDataViewer {
-public:
- vtkMPR3DDataViewer();
- virtual ~vtkMPR3DDataViewer();
- vtkImageActor* GetImageActor(int id);
- vtkActor* GetOutlineActor();
- virtual void Refresh();
- virtual void Configure();
- void SetVisiblePosition(int idPosition, bool visible);
- bool GetVisiblePosition(int idPosition);
- vtkImageActor* GetvtkActor_saggital();
- vtkImageActor* GetvtkActor_axial();
- vtkImageActor* GetvtkActor_coronal();
- void SetPositionX(int pos);
- void SetPositionY(int pos);
- void SetPositionZ(int pos);
- void SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
- vtkMPRBaseData* GetVtkMPRBaseData();
-
- vtkColorTransferFunction *GetvtkColorTransferFunction();
- std::vector<double > *GetctFunVectorPoint();
- std::vector<double > *GetctFunVectorRed();
- std::vector<double > *GetctFunVectorGreen();
- std::vector<double > *GetctFunVectorBlue();
-
-private:
-
- bool _visiblePosition[3];
-
- // outline
- vtkOutlineFilter *_outlineData;
- vtkPolyDataMapper *_mapOutline;
- vtkActor *_outline;
-
- //
- vtkColorTransferFunction *_ctfun;
- std::vector<double> _ctFunVectorPoint;
- std::vector<double> _ctFunVectorRed;
- std::vector<double> _ctFunVectorGreen;
- std::vector<double> _ctFunVectorBlue;
-
-// vtkLookupTable *_bwLut;
-// vtkLookupTable *_hueLut;
-// vtkLookupTable *_satLut;
-
- vtkImageMapToColors *_saggitalColors;
- vtkImageActor *_saggital;
- vtkImageMapToColors *_axialColors;
- vtkImageActor *_axial;
- vtkImageMapToColors *_coronalColors;
- vtkImageActor *_coronal;
- vtkMPRBaseData *_vtkmprbasedata;
-
-
-};
//------------------------------------------------------------------
//------------------------------------------------------------------
-// Callback for the interaction
-class boxSurfaceObserver : public vtkCommand
-{
- public:
- vtkPlanes *_planes;
- vtkProp *_actor;
- vtkVolumeRayCastMapper *_vtkVolumeRayCastMapper;
-
- boxSurfaceObserver()
- {
- _vtkVolumeRayCastMapper = NULL;
- }
-
- virtual char const *GetClassName() const { return "boxSurfaceObserver";}
-
- static boxSurfaceObserver *New(){
- boxSurfaceObserver * result;
- result = new boxSurfaceObserver();
- return result;
- }
-
- virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
- void SetPlanes(vtkPlanes *planes);
- void SetActor(vtkProp *actor);
- void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
-};
-
-
//------------------------------------------------------------------
//------------------------------------------------------------------
//------------------------------------------------------------------
-class vtkClipping3DDataViewer {
-public:
- //----------------------
- //Constructo-Destructor
- //----------------------
- vtkClipping3DDataViewer();
- virtual ~vtkClipping3DDataViewer();
-
-// vtkImageActor* GetImageActor(int id);
- vtkActor* GetOutlineActor();
- vtkClipPolyData* GetTissueClipper(int id);
- vtkPolyDataMapper* GetTissueMapper(int id);
- vtkPlanes* GetTissuePlanes(int id);
- vtkStripper* GetTissueStripper(int id);
-// vtkGlyph3D* GetGlyph(int id);
- vtkLODActor* GetMaceActor(int id);
-
- vtkMarchingCubes *GetMCubes(int idTissue);
-
- virtual void Refresh();
- void RefreshSurface();
-
- virtual void Configure();
- void Configure_Tissue();
- void Configure_Volume();
-
- void SetIsovalue(int idTissue, int isoValue);
- double GetIsovalue(int idTissue);
-
- vtkVolume *GetVolumeActor();
- vtkVolumeRayCastMapper *GetVolumeMapper();
- vtkPlanes *GetVolumePlanes();
-
- void SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
- vtkMPRBaseData* GetVtkMPRBaseData();
-
- vtkActor *GetTissueActor(int id);
- void SetVisibleTissue(int idTissue, bool visible);
- bool GetVisibleTissue(int idTissue);
- bool GetVisibleVolume();
- void SetVisibleVolume(bool visibleVolume);
-
- void SetRepresentationType(int idTissue, bool representationType);
- bool GetRepresentationType(int idTissue);
-
- boxSurfaceObserver *GetObserverS(int idObserverS);
- boxSurfaceObserver *GetObserverV();
-
- //void ReadVolumeFunctions(char *namefile);
- void ReadVolumeFunctions();
- void ReadMeshVTK(char *namefile);
-
-
- //-------------------
- //Getters Vectors
- //-------------------
-
- std::vector<double>* GetGreyValuesTransferenceFVector();
- std::vector<double>* GetIntensityValuesTransferenceFVector();
- std::vector<double>* GetRedColorsOfColorTransferenceFVector();
- std::vector<double>* GetGreenColorsOfColorTransferenceFVector();
- std::vector<double>* GetBlueColorsOfColorTransferenceFVector();
- std::vector<double>* GetGreyValueColorsOfColorTransferenceFVector();
-
- //--------------------------------------
- //Getters transference function
- //and color of the transference function
- //---------------------------------------
- vtkPiecewiseFunction *GetTransferencefunction();
- vtkColorTransferFunction *GetColorTransferenceFunction();
-
-
-
-private:
-
- vtkMarchingCubes *_mCubes[ VTKMPRDATA_MAXTISSUE ];
- vtkStripper *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
- vtkPolyDataMapper *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
- vtkPlanes *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
- vtkClipPolyData *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
-
- // outline
- vtkOutlineFilter *_outlineData;
- vtkPolyDataMapper *_mapOutline;
- vtkActor *_outline;
-
- /// Volume
- vtkPiecewiseFunction *_tfun;
- vtkColorTransferFunction *_ctfun;
- vtkVolumeRayCastCompositeFunction *_compositeFunction;
- vtkPlanes *_volumePlanes;
- vtkVolumeRayCastMapper *_volumeMapper;
- vtkVolumeProperty *_volumeProperty;
- vtkVolume *_newvol;
-
- vtkMPRBaseData *_vtkmprbasedata;
-
- bool _visibleVolume;
- bool _representationType[VTKMPRDATA_MAXTISSUE];
- bool _visibleTissue[VTKMPRDATA_MAXTISSUE];
- vtkActor *_tissue[VTKMPRDATA_MAXTISSUE];
- boxSurfaceObserver *_observerV;
- boxSurfaceObserver *_observerS[VTKMPRDATA_MAXTISSUE];
-
- std::vector<double> greyValuesTransferenceFVector;
- std::vector<double> intensityValuesTransferenceFVector;
- std::vector<double> redColorsOfColorTransferenceFVector;
- std::vector<double> greenColorsOfColorTransferenceFVector;
- std::vector<double> blueColorsOfColorTransferenceFVector;
- std::vector<double> greyValueColorsOfColorTransferenceFVector;
-};
#endif // __WX__MPR__BASE__DATA__H