]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
#2844 creaMaracasVisu Feature New Normal - ManualPaint_model box, Refresh TransferF...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkMPR3DDataViewer.cxx
index d15fb27911506ce99d13e386932867ead0ddf1ed..ff72cc520cea6d0aba29689ae9fc82244269c954 100644 (file)
@@ -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 "vtkMPR3DDataViewer.h"
 
@@ -7,19 +32,19 @@ vtkMPR3DDataViewer::vtkMPR3DDataViewer()
        _visiblePosition[0]=false;
        _visiblePosition[1]=false;
        _visiblePosition[2]=false;
-       _ctfun = NULL;
-       _vtkmprbasedata=NULL;
-
-       _ctfun=NULL;
-       _saggitalColors=NULL;
-       _saggital=NULL;
-       _axialColors=NULL;
-       _axial=NULL;
-       _coronalColors=NULL;
-       _coronal=NULL;
-       _mapOutline=NULL;
-       _outline=NULL;
-       _outlineData=NULL;
+       _ctfun                  = NULL;
+       _vtkmprbasedata = NULL;
+
+       _ctfun                  = NULL;
+       _saggitalColors = NULL;
+       _saggital               = NULL;
+       _axialColors    = NULL;
+       _axial                  = NULL;
+       _coronalColors  = NULL;
+       _coronal                = NULL;
+       _mapOutline             = NULL;
+       _outline                = NULL;
+       _outlineData    = NULL;
 }
 //-------------------------------------------------------------------
 vtkMPR3DDataViewer::~vtkMPR3DDataViewer()
@@ -28,16 +53,16 @@ vtkMPR3DDataViewer::~vtkMPR3DDataViewer()
        if(_mapOutline)  {_mapOutline-> Delete();}
        if(_outline)     {_outline-> Delete();}
 
-//     if (_bwLut)             _bwLut->Delete();
-//     if (_hueLut)            _hueLut->Delete();
-//     if (_satLut)            _satLut->Delete();
-       if (_ctfun)             _ctfun->Delete();
+//     if (_bwLut)                             _bwLut->Delete();
+//     if (_hueLut)                    _hueLut->Delete();
+//     if (_satLut)                    _satLut->Delete();
+       if (_ctfun)                             _ctfun->Delete();
        if (_saggitalColors)    _saggitalColors ->Delete();
-       if (_saggital)          _saggital->Delete();
-       if (_axialColors)       _axialColors->Delete();
-       if (_axial)             _axial->Delete();
-       if (_coronalColors)     _coronalColors->Delete();
-       if (_coronal)           _coronal->Delete();
+       if (_saggital)                  _saggital->Delete();
+       if (_axialColors)               _axialColors->Delete();
+       if (_axial)                             _axial->Delete();
+       if (_coronalColors)             _coronalColors->Delete();
+       if (_coronal)                   _coronal->Delete();
 
 }
 //-------------------------------------------------------------------
@@ -49,17 +74,21 @@ vtkActor* vtkMPR3DDataViewer::GetOutlineActor()
 vtkImageActor* vtkMPR3DDataViewer::GetImageActor(int id)
 {
        vtkImageActor *tmpVtkActor=NULL;
-       if (id==0){
+       if (id==0)
+       {
                tmpVtkActor = GetvtkActor_saggital();
        }
-       if (id==1){
+       if (id==1)
+       {
                tmpVtkActor = GetvtkActor_coronal();
        }
-       if (id==2){
+       if (id==2)
+       {
                tmpVtkActor = GetvtkActor_axial();
        }
        return tmpVtkActor;
 }
+
 //-------------------------------------------------------------------
 void vtkMPR3DDataViewer::Refresh()
 {
@@ -318,30 +347,40 @@ vtkImageActor * vtkMPR3DDataViewer::GetvtkActor_axial()
 }
 
 //------------------------------------------------------------------------
-void vtkMPR3DDataViewer::SetPositionX(int pos){
+void vtkMPR3DDataViewer::SetPositionX(int pos)
+{
        int x1,x2,y1,y2,z1,z2;
        _vtkmprbasedata->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
        if(_saggital)
        {
                _saggital->SetDisplayExtent( pos , pos , y1 ,y2 , z1 , z2 );
+//EED 2016/02/19
+               _saggital->SetInterpolate(  GetVtkMPRBaseData()->GetInterpolate() );
        }
 }
+
 //------------------------------------------------------------------------
-void vtkMPR3DDataViewer::SetPositionY(int pos){
+void vtkMPR3DDataViewer::SetPositionY(int pos)
+{
        int x1,x2,y1,y2,z1,z2;
        _vtkmprbasedata->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
        if(_coronal)
        {
                _coronal->SetDisplayExtent(x1,x2, pos,pos, z1,z2);
+//EED 2016/02/19
+               _coronal->SetInterpolate(  GetVtkMPRBaseData()->GetInterpolate() );
        }
 }
 //------------------------------------------------------------------------
-void vtkMPR3DDataViewer::SetPositionZ(int pos){
+void vtkMPR3DDataViewer::SetPositionZ(int pos)
+{
        int x1,x2,y1,y2,z1,z2;
        _vtkmprbasedata->GetDimensionExtention(&x1,&x2,&y1,&y2,&z1,&z2);
        if(_axial)
        {
                _axial->SetDisplayExtent(x1,x2, y1,y2, pos,pos);
+//EED 2016/02/19
+               _axial->SetInterpolate(  GetVtkMPRBaseData()->GetInterpolate() );
        }
 }
 //-------------------------------------------------------------------