X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtkClipping3DView.cxx;h=a53f035ec2421be2185950c90eba8b1759fb709a;hb=4dcdcabb81ce9f9e9b7ccdb86a64995d7b18ea23;hp=3d1d5a9a7ef7eae2435410048de036bd2b8c5828;hpb=35a5d83be3d84f9d1544b8d3ad0de044f1e65286;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx index 3d1d5a9..a53f035 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx @@ -1,3 +1,28 @@ +/*# --------------------------------------------------------------------- +# +# 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 "wxVtkClipping3DView.h" #include "wxVtkClipping3DViewCntrlPanel.h" @@ -15,7 +40,8 @@ wxVtkClipping3DView::wxVtkClipping3DView(wxVtk3DBaseView* wxvtk3Dbaseview) } //------------------------------------------------------------------- -wxVtkClipping3DView::~wxVtkClipping3DView(){ +wxVtkClipping3DView::~wxVtkClipping3DView() +{ if (_boxWidgetVolume!=NULL) { _boxWidgetVolume -> Delete(); } if (_boxWidgetS1!=NULL) { _boxWidgetS1 -> Delete(); } if (_vtkclipping3Ddataviewer!=NULL) { delete _vtkclipping3Ddataviewer; } @@ -128,7 +154,8 @@ wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview()throw(char*) return _wxvtk3Dbaseview; } //------------------------------------------------------------------- -void wxVtkClipping3DView::Configure(){ +void wxVtkClipping3DView::Configure() +{ _wxvtk3Dbaseview->Configure(); // Actors are added to the renderer. @@ -199,11 +226,14 @@ void wxVtkClipping3DView::Configure(){ // _boxWidgetVolume->GetPlanes( vtkplanes ); +//EED 27/05/2013 +// _wxvtk3Dbaseview->GetRenderer()->ResetCamera (); +// _wxvtk3Dbaseview->GetCamera()->Dolly(1.2); + // An initial camera view is created. The Dolly() method moves // the camera towards the FocalPoint, thereby enlarging the image. - _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera()); - _wxvtk3Dbaseview->GetRenderer()->ResetCamera (); - _wxvtk3Dbaseview->GetCamera()->Dolly(1.5); + _wxvtk3Dbaseview->ResetCamera(); + // Set a background color for the renderer and set the size of the // render window (expressed in pixels). @@ -216,14 +246,12 @@ void wxVtkClipping3DView::Configure(){ // near plane clips out objects in front of the plane; the far plane // clips out objects behind the plane. This way only what is drawn // between the planes is actually rendered. - _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange(); - - cout<<"EED::JPRG::wxVtkClipping3DView::SetVtkClipping3DDataViewer::GetRenderer()::"<GetWxvtk3Dbaseview()->GetRenderer()<GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()<GetRenderer()->ResetCameraClippingRange(); _vtkclipping3Ddataviewer->SetRenderer(this->GetWxvtk3Dbaseview()->GetRenderer()); _vtkclipping3Ddataviewer->SetInteractor(this->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()); + } //------------------------------------------------------------------- void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vtkclipping3Ddataviewer)