clivp->SetImage( bbGetInputIn() );
bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
+ bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
+printf("EED ColorLayerImageView::Process A ptrLookupTable:%p\n",clivp->GetColorLayerImageViewManager()->GetLookupTable(0));
+printf("EED ColorLayerImageView::Process B ptrLookupTable:%p\n",bbGetOutputLookupTable() );
if (firsttime==true)
{
#include "wxVtkBaseView.h"
+#include <vtkScalarsToColors.h>
+
+
namespace bbcreaMaracasVisu
{
BBTK_DECLARE_INPUT(FittingMode,int);
BBTK_DECLARE_INPUT(ColorBarPosition,std::vector<int>);
BBTK_DECLARE_OUTPUT(NewImage,vtkImageData*);
+ BBTK_DECLARE_OUTPUT(LookupTable,vtkScalarsToColors*);
BBTK_PROCESS(Process);
void Process();
BBTK_CREATE_WIDGET(CreateWidget);
BBTK_INPUT(ColorLayerImageView,ColorBarPosition,"default (10,105)",std::vector<int>,"");
BBTK_OUTPUT(ColorLayerImageView,NewImage,"Image with correct Spacing",vtkImageData*,"");
-
+ BBTK_OUTPUT(ColorLayerImageView,LookupTable,"Image with correct Spacing",vtkScalarsToColors*,"");
BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView);
//=====
return NULL;
}
+//----------------------------------------------------------------------------
+vtkLookupTable* ColorLayerImageViewManager::GetLookupTable(int id)
+{
+printf("EED ColorLayerImageViewManager::GetLookupTable 0 \n");
+ if (_colorLayerImageViewLst[id]!=NULL)
+ {
+printf("EED ColorLayerImageViewManager::GetLookupTable 1 \n");
+ return _colorLayerImageViewLst[id]->GetThresholdTable( );
+ } // if
+printf("EED ColorLayerImageViewManager::GetLookupTable 2 \n");
+ return NULL;
+}
+
//----------------------------------------------------------------------------
void ColorLayerImageViewManager::GetDimensionBase(int id,int *dim)
{
void GetSpcOriginalLayer (int id,double *spc);
void SetNewSpacingLayer (double *spc);
+ vtkLookupTable* GetLookupTable(int id);
private:
std::vector< ColorLayerImageView* > _colorLayerImageViewLst;
} // if imagebase
} // if wxvtkbaseview
_image->GetScalarRange( _range );
- _thresholdTable = vtkLookupTable::New();
+// _thresholdTable = vtkLookupTable::New();
//EED 2017-01-01 Migration VTK7
//----------------------------------------------------------------------------
vtkLookupTable* LayerImageBase::GetThresholdTable()
{
+printf("EED LayerImageBase::GetThresholdTable\n");
return _thresholdTable;
}
wxVtkBaseView * baseView = _baseView;
baseView->GetRenderer()->RemoveActor( _thresholdActor );
baseView->GetRenderer()->RemoveActor( _scalarbarActor );
-
_actorPresent = false;
} // if _actorPresent
}
-//----------------------------------------------------------------------------
-vtkLookupTable *LayerImageBase::GetvtkLookupTable()
-{
- return _thresholdTable;
-}
-
//----------------------------------------------------------------------------
vtkImageReslice *LayerImageBase::GetvtkImageReslice()
{
#include "InteractorStyleMaracas.h"
#include "vtkImageChangeInformation.h"
-
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
void onThresholdRemove();
wxVtkBaseView *GetwxVtkBaseView();
void Refresh();
- vtkLookupTable *GetvtkLookupTable();
+ vtkLookupTable *GetThresholdTable();
+
vtkImageReslice *GetvtkImageReslice();
virtual int GetX();
virtual int GetY();
void CleanXYZ(double &x, double &y, double &z);
protected:
- vtkLookupTable *GetThresholdTable();
double _range[2];
std::vector<double> _rangeForColorBar;
std::vector<int> _colorBarPosition;
bool manualInteractorWindowLevel::OnMouseMove() // virtual
{
+
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+printf("EED Warning manualInteractorWindowLevel::OnMouseMove Clean this put in a specific class for camera Interaction ....\n");
+
+// EED Mising in the wheal event and the ctrl+MouseRight Event
+ wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
+ vtkBaseData *vtkbasedata = wxvtk2Dbaseview->GetVtkBaseData();
+ double parallelscaling=wxvtk2Dbaseview->GetRenderer()->GetActiveCamera()->GetParallelScale();
+ vtkbasedata->SetCameraParallelScale( parallelscaling );
+ this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
+//-----------------
+
+
if (_stateWindowLevel==true)
{
int tmpPx,tmpPy;
//-------------------------------------------------------------------
vtkBaseData::vtkBaseData()
{
- _z = 0;
- _t = 0;
- _marImageData = 0;
- _interpolate = true;
- _fixAxis2D = false;
- _opacityAxis = 1.0;
- _observable = vtkObject::New();
+ _z = 0;
+ _t = 0;
+ _marImageData = 0;
+ _interpolate = true;
+ _fixAxis2D = false;
+ _opacityAxis = 1.0;
+ _observable = vtkObject::New();
+ _cameraparallelScale = 100.0;
}
//-------------------------------------------------------------------
{
_opacityAxis = value;
}
+
+//-------------------------------------------------------------------
+double vtkBaseData::GetCameraParallelScale()
+{
+ return _cameraparallelScale;
+}
+
+//-------------------------------------------------------------------
+void vtkBaseData::SetCameraParallelScale(double value)
+{
+ _cameraparallelScale=value;
+}
+
+
+
bool GetFixAxis2D();
void SetFixAxis2D(bool value);
double GetOpacityAxis();
- void SetOpacityAxis(double value);
-
+ void SetOpacityAxis(double value);
+ double GetCameraParallelScale();
+ void SetCameraParallelScale(double value);
+
protected:
marImageData *_marImageData;
double _z;
bool _fixAxis2D;
double _opacityAxis;
vtkObject* _observable;
+ double _cameraparallelScale;
private:
};
camera->SetClippingRange( 0.01 , 1000000 );
camera->ComputeViewPlaneNormal();
- camera->SetParallelScale( spx*(x2-x1)/3.0 );
+
+ double cameraparallelScale=spx*(x2-x1)/3.0;
+ camera->SetParallelScale( cameraparallelScale );
+ GetVtkBaseData()->SetCameraParallelScale( cameraparallelScale );
// text information over the graphic window
if(_vtkIinfoTextImage == NULL){
//EED 24oct2010
//EED 02nov2012
-// vtkImageViewer2 *vtkimageviewer2 = _imageViewer2XYZ->GetVtkImageViewer2();
-
vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel();
imagemaptowindowlevel->SetWindow( GetVtkBaseData()->GetColorWindow() );
imagemaptowindowlevel->SetLevel( GetVtkBaseData()->GetColorLevel() );
-
-// EED Borrame
-// vtkimageviewer2->SetColorWindow( GetVtkBaseData()->GetColorWindow() );
-// vtkimageviewer2->SetColorLevel( GetVtkBaseData()->GetColorLevel() );
_imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->Modified();
}
+//-------------------------------------------------------------------
+void wxVtk2DBaseView::UpdateCameraParallelScale()
+{
+ vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
+ camera->SetParallelScale( GetVtkBaseData()->GetCameraParallelScale() );
+}
+
//-------------------------------------------------------------------
void wxVtk2DBaseView::Refresh()
{
imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() );
//EED 01nov2012
UpdateColorWindowLevel();
+ UpdateCameraParallelScale();
wxVtkBaseView::Refresh();
}
//EED 01nov2012
void UpdateColorWindowLevel();
+ //EED 05juin2019
+ void UpdateCameraParallelScale();
+
private:
vtkInfoTextImage *_vtkIinfoTextImage;
vtkInfoTextImageInteractor *_vtkIinfoTextImageInteractor;
imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() );
//EED 01nov2012
UpdateColorWindowLevel();
+//EED 05juin2019
+ UpdateCameraParallelScale();
wxVtkBaseView::Refresh();
}
}