]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
#3020 creaMaracasVisu Bug New Normal - ViewerNV opacity, isovalue slice (size)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkClipping3DViewCntrlPanel.cxx
index 95af503dac672136a2452de472e237593f5a1169..da8764c2c9ff569dec6f1d5c16073b0b682015bd 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 "wxVtkClipping3DViewCntrlPanel.h"
 #include "wx/colordlg.h"
@@ -23,49 +48,52 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
                                        _surfC                  = new wxRadioButton(panel,-1,_T("C"));
                                        _surfD                  = new wxRadioButton(panel,-1,_T("D"));
 
-       wxCheckBox              *ckVolum                = new wxCheckBox(panel,-1,_T("Vol"));
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //wxCheckBox            *ckVolum                = new wxCheckBox(panel,-1,_T("Vol"));
        wxCheckBox              *ckBoxSurface   = new wxCheckBox(panel,-1,_T("Surface Box"));
-       wxCheckBox              *ckBoxVolume    = new wxCheckBox(panel,-1,_T("Volume Box"));
+
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //wxCheckBox            *ckBoxVolume    = new wxCheckBox(panel,-1,_T("Volume Box"));
 
                                        _color                  = new wxButton(panel,-1,_T(""));
                                        _visible                = new wxCheckBox(panel,-1,_T("Vis"));
-                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL | wxSL_LABELS);
+                                       _opacity                = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
 
        wxStaticText    *isoValueTitle  = new wxStaticText(panel,-1,_T("isoValue"));
-                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
-
+                                       _isoValue               = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL  |  wxSL_AUTOTICKS | wxSL_LABELS);
 
                                        _wireFrameRep   = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
                                        _surfaceRep             = new wxRadioButton(panel,-1,_T("Surface"));
 
-
        double range[2];
        vtkImageData *vtkimagedata = wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        vtkimagedata->GetScalarRange( range );
        _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) );
        _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) );
 
-
        _isoValue->SetTickFreq(25,0);
 
        _isoValueSpin   = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT  );
        _isoValueSpin->SetRange(1,8);
        _isoValueSpin->SetValue(5);
-       Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin ); 
+       Connect(_isoValueSpin->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED   , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnIsoValueSpin );
 
        wxButton *btnSTL                                = new wxButton(panel,-1,_T("Create STL File"));
        wxButton *btnSaveRaw                    = new wxButton(panel,-1,_T("Save Raw Volume"));
 
-       wxButton *btnVolumeFunctions    = new wxButton(panel,-1,_T("Read Volume Functions"));
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //wxButton *btnVolumeFunctions  = new wxButton(panel,-1,_T("Read Volume Functions"));
 
 
-       Connect(btnSTL->GetId()                         , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL    ); 
-       Connect(btnSaveRaw->GetId()                     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume    ); 
-       Connect(btnVolumeFunctions->GetId()     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions  ); 
+       Connect(btnSTL->GetId()                         , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL    );
+       Connect(btnSaveRaw->GetId()                     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume    );
+
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //Connect(btnVolumeFunctions->GetId()   , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions  );
 
 
        wxButton *btnMeshVTKLoad        = new wxButton(panel,-1,_T("Load Mesh"));
-       Connect(btnMeshVTKLoad->GetId() , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad      ); 
+       Connect(btnMeshVTKLoad->GetId() , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad      );
 
 
 /*
@@ -82,7 +110,11 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
 
 //     ckVolum->Enable(false);
        ckBoxSurface->SetValue(false);
-       ckBoxVolume->SetValue(false);
+
+
+       //ckBoxVolume->SetValue(false);
+
+
        _color->SetSize(40,20);
        _opacity->SetSize(370,20);
 //     ckBoxX->SetValue(true);
@@ -96,8 +128,9 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
 //     _positionY->SetSize(400,20);
 //     _positionZ->SetSize(400,20);
 
-       Connect(ckVolum->GetId()                , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume                             );
-       Connect(ckBoxVolume->GetId()    , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume                  );
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //Connect(ckVolum->GetId()              , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleVolume                             );
+       //Connect(ckBoxVolume->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED          , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume                  );
 
        Connect(_surfA->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
        Connect(_surfB->GetId()                 , wxEVT_COMMAND_RADIOBUTTON_SELECTED  , (wxObjectEventFunction) &wxVtkClipping3DViewCntrlPanel::OnSurface                                       );
@@ -134,21 +167,22 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
        //wxFlexGridSizer *sizerH5 = new wxFlexGridSizer(10); // JPRx
        //wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10); // JPRx
 
-       sizerH0->Add( ckVolum                                                                   , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( ckBoxVolume                                                               , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( btnVolumeFunctions                                                , 1, wxALL|wxEXPAND, 0);
-       sizerH0->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
+       //RaC 03-2010 Divides in two panels thje last tab Surface/Volume
+       //sizerH0->Add( ckVolum                                                                 , 1, wxALL|wxEXPAND, 0);
+       //sizerH0->Add( new wxStaticText(panel, -1,_T("          "))    , 1, wxALL|wxEXPAND, 0);
+       //sizerH0->Add( ckBoxVolume                                                             , 1, wxALL|wxEXPAND, 0);
+       //sizerH0->Add( new wxStaticText(panel, -1,_T("          "))    , 1, wxALL|wxEXPAND, 0);
+       //sizerH0->Add( btnVolumeFunctions                                              , 1, wxALL|wxEXPAND, 0);
+       //sizerH0->Add( new wxStaticText(panel, -1,_T("          "))    , 1, wxALL|wxEXPAND, 0);
        sizerH0->Add( btnMeshVTKLoad                                                    , 1, wxALL|wxEXPAND, 0);
 
 
        sizerH1->Add( _surfA                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))              , 1, wxALL|wxEXPAND, 0);
        sizerH1->Add( _surfB                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))              , 1, wxALL|wxEXPAND, 0);
        sizerH1->Add( _surfC                                                                    , 1, wxALL|wxEXPAND, 0);
-       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))                      , 1, wxALL|wxEXPAND, 0);
+       sizerH1->Add( new wxStaticText(panel, -1,_T("  "))              , 1, wxALL|wxEXPAND, 0);
        sizerH1->Add( _surfD                                                                    , 1, wxALL|wxEXPAND, 0);
        sizerH1->Add( new wxStaticText(panel, -1,_T("          "))      , 1, wxALL|wxEXPAND, 0);
        sizerH1->Add( ckBoxSurface                                                              , 1, wxALL|wxEXPAND, 0);
@@ -164,19 +198,23 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w
        sizerH2->Add( _visible                          , 1, wxALL|wxEXPAND, 0);
        sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
 
-       
+
        sizerH2->Add( _wireFrameRep                             , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
        sizerH2->Add( new wxStaticText(panel, -1,_T("   "))                                     , 1, wxALL|wxEXPAND, 0);
        sizerH2->Add( _surfaceRep                               , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0);
        sizerH2->Add( new wxStaticText(panel, -1,_T("          "))                      , 1, wxALL|wxEXPAND, 0);
-       
-       sizerH2->Add( _opacity                          , 1, wxALL|wxEXPAND, 0);
+
 
 
        sizerH3->Add( isoValueTitle                     , 1, wxALL|wxEXPAND, 0);
        sizerH3->Add( _isoValueSpin                     , 1, wxALL|wxEXPAND, 0);
        sizerH3->Add( _isoValue                         , 1, wxALL|wxEXPAND, 0);
 
+       sizerH3->Add( new wxStaticText(panel, -1,_T("      "))                  , 1, wxALL|wxEXPAND, 0);
+       sizerH3->Add( new wxStaticText(panel, -1,_T("Opacity:"))                        , 1, wxALL|wxEXPAND, 0);
+       sizerH3->Add( _opacity                          , 1, wxALL|wxEXPAND, 0);
+
+
 /*
        sizerH4->Add( ckBoxX            , 1, wxALL|wxEXPAND, 0);
        sizerH4->Add( text2                     , 1, wxALL|wxEXPAND, 0);
@@ -285,8 +323,8 @@ void wxVtkClipping3DViewCntrlPanel::OnSurface(wxCommandEvent& event)
                _opacity->SetValue( (int)(tmpActor->GetProperty()->GetOpacity()*100) );
 
                // Representation Type  WireFrame / Surface
-               _surfaceRep->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
-               _wireFrameRep->SetValue(!_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue)); 
+               _surfaceRep->SetValue(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue));
+               _wireFrameRep->SetValue(!_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetRepresentationType(idTissue));
 
                // isoValue
                int isoValue= (int)(_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(idTissue));
@@ -329,7 +367,9 @@ void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume(wxCommandEvent& event)
 {
-       _wxvtkclipping3Dview->SetVisibleBoxVolume(event.IsChecked() );
+printf("EED ERROR JPReyes wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume  calling   _wxvtkclipping3Dview->SetVisibleBoxVolume that not exists ...");
+//EED01July2011        _wxvtkclipping3Dview->SetVisibleBoxVolume(event.IsChecked() );
+       //this->BoundingBoxChanged(event.IsChecked());
        _wxvtkclipping3Dview->Refresh();
 }
 //-------------------------------------------------------------------
@@ -341,7 +381,7 @@ void wxVtkClipping3DViewCntrlPanel::OnColor(wxCommandEvent& event)
 // EED 17 Janvier 2007
                wxColourDialog dlgColour(this);
 //             dlgColour.ShowModal();
-               if( dlgColour.ShowModal( ) == wxID_OK ) 
+               if( dlgColour.ShowModal( ) == wxID_OK )
                {
                        vtkActor *tmpActor;
                        tmpActor = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
@@ -418,7 +458,7 @@ void wxVtkClipping3DViewCntrlPanel::OnIsoValue(wxScrollEvent& event)
                _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->SetIsovalue(idTissue,isoValue);
 //             wxString tmpStr;
 //             tmpStr.Printf("%d",isoValue);
-       
+
                _wxvtkclipping3Dview->Refresh();
 
                wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
@@ -440,10 +480,10 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
        wxString dirSTL = wxGetHomeDir( ) ;
        wxFileDialog dialog( this, _T("Choose a directory..."), dirSTL , _T(""), _T("*.*"), wxSAVE );
 
-       if( dialog.ShowModal( ) == wxID_OK ) 
+       if( dialog.ShowModal( ) == wxID_OK )
        {
-          
-       
+
+
                // ------------------------------------------------------------------------
                //  1.  GENERATE STL FILES
                // ------------------------------------------------------------------------
@@ -472,7 +512,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnCreateFileSTL(wxCommandEvent& event)
         writer->Write();
         writer->Delete();
 
-   
+
         filtro->Delete();
         cpd->Delete();
         pdcf->Delete();
@@ -512,7 +552,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(wxCommandEvent& event)
 //-------------------------------------------------------------------
 void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
 {
-       
+
        int /*i=0,*/ xi,yi,r,g,b;  // JPRx
        vtkColorTransferFunction* ctfun = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetColorTransferenceFunction();
        vtkPiecewiseFunction* tfun      = this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTransferencefunction();
@@ -531,18 +571,18 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
        */
 
        /*
-       MMLR BORRAME 
+       MMLR BORRAME
        wxFileDialog dialog(this, _T("Choose a file"), _T("c:/Maracas_configuration"),_T(""), _T("*.MarVolConf"), wxOPEN);
        if (dialog.ShowModal() == wxID_OK)
        {
                _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->ReadVolumeFunctions( (char *)dialog.GetPath().c_str() );
-               
-       
+
+
        }
        */
 
        HistogramDialog* hDlg=new HistogramDialog(NULL,_T("Histogram Dialog"),imagedata,1);
-       // 
+       //
        // put in a method
        //
        int tfSize=gtf->size();
@@ -557,7 +597,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                                hDlg->addPointToTransferenceFunction(g,in*100);
                                i++;
                        }
-                       
+
                }
 
        int ctfSize=rctf->size();
@@ -586,12 +626,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
        // when the user had changed the transference Function
        //
        if(hDlg->ShowModal()== wxID_OK )
-       {       
+       {
                        // -- vtkPiecewiseFunction --
                        tfun->RemoveAllPoints();
                        gtf->clear();
                        itf->clear();
-               
+
                        int nTFPoints=hDlg->getSizeTransferenceFunction();
                        int i=0;
                        while(i<nTFPoints)
@@ -601,7 +641,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                                gtf->push_back(xi);
                                itf->push_back(yi/100.0);
                                i++;
-                       }       
+                       }
                        // -- vtkColorTransferFunction  --
                        ctfun->RemoveAllPoints ();
                        //clean colors
@@ -611,7 +651,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        greyctf->clear();
 
                        int nCTFpoints=hDlg->getSizeBarColor();
-                       i=0;    
+                       i=0;
                        while(i<nCTFpoints)
                        {
                                hDlg->getDataBarColorPoint(i,xi,r,g,b);
@@ -629,16 +669,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-                       
+
                        /*
                        volumeMapper->Update();
                        newvol->Update();
                        */
-       }
-       
-       else
-       {
-               
+       } else  {
                if(hDlg->getRefreshed())
                {
                        int i=0,size;
@@ -652,12 +688,12 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                                double  in2=(*itf)[i];
                                tfun->AddPoint( grey1 , in2 );
                        }
-                       
+
                        // -- vtkColorTransferFunction  --
                        ctfun->RemoveAllPoints ();
-                       
+
                        i=0;
-                       size=greyctf->size();           
+                       size=greyctf->size();
                        for(i=0;i<size;i++)
                        {
                                double grey2=(*greyctf)[i];
@@ -666,7 +702,7 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                                double blue = (*bctf)[i];
                                ctfun->AddRGBPoint(grey2,red,green,blue);
                        }
-               
+
                        //---------------------------------
                        // Refreshing and sending the event
                        //---------------------------------
@@ -674,13 +710,13 @@ void wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(wxCommandEvent& event)
                        _wxvtkclipping3Dview->Refresh();
                        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
                        _wxvtkclipping3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
-                       
+
                        /*
                        volumeMapper->Update();
                        newvol->Update();
                        */
                 }
-                
+
        }
        //destroy the dialog
        hDlg->Destroy();