X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtk2DBaseView.cxx;h=6e9a593ecf92b19d245dcbdbc1d104e42d31391d;hb=439cc05f12e61d0ba090ec0c2ba8701d382238d7;hp=fe3b8513deaa5cf49f02c1d594f587ddf77d00b8;hpb=543dfcbe8f5ff78bbed90ef1e20c722bfa0ef248;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx index fe3b851..6e9a593 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx @@ -1,8 +1,34 @@ +/*# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sant�) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ */ + #include "wxVtk2DBaseView.h" #include "vtkInfoTextImage.h" #include "vtkInteractorStyleBaseView2D.h" #include "vtkInfoTextImageInteractor.h" +#include "vtkImageActor.h" wxVtk2DBaseView::wxVtk2DBaseView(wxWindow *parent) @@ -251,28 +277,15 @@ void wxVtk2DBaseView::Configure(bool okimage) int wxVtk2DBaseView::GetActualSlice() // virtual { - return (int)(_vtkbasedata->GetZ()); + return (int)(GetVtkBaseData()->GetZ()); } //------------------------------------------------------------------- void wxVtk2DBaseView::SetActualSlice(int slice) // Virtual { - _vtkbasedata->SetZ(slice); -} - -//------------------------------------------------------------------- - -vtkBaseData *wxVtk2DBaseView::GetVtkBaseData() -{ - return _vtkbasedata; + GetVtkBaseData()->SetZ(slice); } -//------------------------------------------------------------------- - -void wxVtk2DBaseView::SetVtkBaseData(vtkBaseData *vtkbasedata) -{ - _vtkbasedata=vtkbasedata; -} //------------------------------------------------------------------- void wxVtk2DBaseView::UpdateColorWindowLevel() @@ -284,12 +297,12 @@ void wxVtk2DBaseView::UpdateColorWindowLevel() vtkImageMapToWindowLevelColors* imagemaptowindowlevel = _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel(); - imagemaptowindowlevel->SetWindow( _vtkbasedata->GetColorWindow() ); - imagemaptowindowlevel->SetLevel( _vtkbasedata->GetColorLevel() ); + imagemaptowindowlevel->SetWindow( GetVtkBaseData()->GetColorWindow() ); + imagemaptowindowlevel->SetLevel( GetVtkBaseData()->GetColorLevel() ); // EED Borrame -// vtkimageviewer2->SetColorWindow( _vtkbasedata->GetColorWindow() ); -// vtkimageviewer2->SetColorLevel( _vtkbasedata->GetColorLevel() ); +// vtkimageviewer2->SetColorWindow( GetVtkBaseData()->GetColorWindow() ); +// vtkimageviewer2->SetColorLevel( GetVtkBaseData()->GetColorLevel() ); _imageViewer2XYZ->GetVtkImageViewer2()->GetWindowLevel()->Modified(); } @@ -298,6 +311,11 @@ void wxVtk2DBaseView::Refresh() { int z = (int)(GetVtkBaseData()->GetZ()); _imageViewer2XYZ->SetZSlice( z ); + +//EED 2016/02/19 + vtkImageActor *imageactor = _imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor(); + imageactor->SetInterpolate( GetVtkBaseData()->GetInterpolate() ); + //EED 01nov2012 UpdateColorWindowLevel(); wxVtkBaseView::Refresh(); @@ -361,7 +379,7 @@ void wxVtk2DBaseView::setColorTransferFunction(vtkColorTransferFunction* colorta void wxVtk2DBaseView::SetColorWindow(double level) { // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorWindow(level); - _vtkbasedata->SetColorWindow(level); + GetVtkBaseData()->SetColorWindow(level); this->Refresh(); } @@ -369,7 +387,7 @@ void wxVtk2DBaseView::SetColorWindow(double level) void wxVtk2DBaseView::SetColorLevel(double level) { // _imageViewer2XYZ->GetVtkImageViewer2()->SetColorLevel(level); - _vtkbasedata->SetColorLevel(level); + GetVtkBaseData()->SetColorLevel(level); this->Refresh(); }