void ColorLayerImageView::Process()
 {
     ColorLayerImageViewPanel *clivp = (ColorLayerImageViewPanel*)bbGetOutputWidget();
-
         if (firsttime==true)
         {
 //             firsttime=false;
        clivp->SetActive( bbGetInputActive() );
         }
-
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 0 , bbGetInputWxVtkBaseView() );
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 1 , bbGetInputWxVtkBaseView1() );
     clivp->GetColorLayerImageViewManager()->SetwxVtkBaseView( 2 , bbGetInputWxVtkBaseView2() );
-
     std::vector<double> range = bbGetInputlstRangeForColorBar();
     clivp->GetColorLayerImageViewManager()->SetRangeForColorBar( range );
-
     std::vector<int> colorbarposition = bbGetInputColorBarPosition();
     clivp->GetColorLayerImageViewManager()->SetColorBarPosition( colorbarposition );
-
     std::vector<double> base_color = bbGetInputlstBaseColor();
     clivp->GetColorLayerImageViewManager()->SetBaseColors( base_color );
-
     std::vector<double> grey_level_boundaries = bbGetInputlstGreyLevelBoundaries();
     clivp->GetColorLayerImageViewManager()->SetGreyLevelBoundaries( grey_level_boundaries );
-
     std::vector<double> transparence_level_boundaries = bbGetInputlstTransparenceBoundaries();
     clivp->GetColorLayerImageViewManager()->SetBaseTransparence( transparence_level_boundaries );
-
     clivp->GetColorLayerImageViewManager()->SetPlainOrGradientColor( bbGetInputPlainOrGradientColor() );
     clivp->SetFittingMode( bbGetInputFittingMode() );
-
     clivp->SetImage( bbGetInputIn() );
-
     bbSetOutputNewImage( clivp->GetColorLayerImageViewManager()->GetImageChangeInformation(0) );
     bbSetOutputLookupTable( clivp->GetColorLayerImageViewManager()->GetLookupTable(0) );
-
         if (firsttime==true)
         {
                firsttime=false;
        clivp->ChangeOpacity();
         }
-
 }
 //=====
 // Don't edit this file. This file is generated from xml description..
 
 {
        //printf("CPR: bbwxMaracas_N_ViewersWidget::OnRefreshView -> actualiza X, Y y Z\n");
        mbbViewerNV->_point.clear();
-
        mbbViewerNV->_point.push_back( (int)GetX() );
        mbbViewerNV->_point.push_back( (int)GetY() );
        mbbViewerNV->_point.push_back( (int)GetZ() );
        mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point );
        mbbViewerNV->bbSignalOutputModification(std::string("Point"));
-
        wxMaracas_N_ViewersWidget::OnRefreshView(event);
 }
 
                _point.push_back((int)_mwxwidget->GetY());
                _point.push_back((int)_mwxwidget->GetZ());
                bbSetOutputPoint(_point);
-       //    WxBlackBox::Process();
-//             mwxwidget->SetImage(img );
+
                wxVtkBaseView *wvbv1 = _mwxwidget->GetwxVtkBaseView(1);
                wxVtkBaseView *wvbv2 = _mwxwidget->GetwxVtkBaseView(2);
                wxVtkBaseView *wvbv3 = _mwxwidget->GetwxVtkBaseView(3);
 
                wxwindow4               = NULL;
                _currentwxw             = NULL;
                mvtkmprbasedata = NULL;
-
                wxSizer *sizer  = new wxBoxSizer(wxVERTICAL);
                this->SetSizer(sizer);
                this->SetAutoLayout(true);
-
-
-               if(imagedata!=NULL && nTypeView!=NULL ){
+               if(imagedata!=NULL && nTypeView!=NULL )
+               {
                        this->SetType(nTypeView);
                        this->UpdateLayout(imagedata);
                }
-
-
        }
        /**
        *       @pre A wxWindow* object must be provided as a parent for the viewer and the type of layout for the viewer
                //this->Layout();
                //this->Refresh();
 
-
 // I don't undestand how this works and not the opposite ...
                if (wxwindow4!=NULL) {wxwindow4->ConfigureVTK(); }
                if (wxwindow3!=NULL) {wxwindow3->ConfigureVTK(); }
         if (wxwindow2!=NULL) { wxwindow2->SetImage(image); }
         if (wxwindow3!=NULL) { wxwindow3->SetImage(image); }
         if (wxwindow4!=NULL) { wxwindow4->SetImage(image); }
-        
 //      ConfigureVTK();
  }
 
 
 
 
 //-------------------------------------------------------------------------
-       void wxMaracas_ViewerWidget::SetImage( vtkImageData *image )
+void wxMaracas_ViewerWidget::SetImage( vtkImageData *image )
+{
+       if(mvtkmprbasedata !=NULL)
+       {
+               marImageData* mar = mvtkmprbasedata->GetMarImageData();
+               mar->removeImageData(0);
+               mar->AddImageData(image);
+       }       
+       if (mvtk2Dbaseview!=NULL)
        {
-               if(mvtkmprbasedata !=NULL)
-               {
-                       marImageData* mar = mvtkmprbasedata->GetMarImageData();
-                       mar->removeImageData(0);
-                       mar->AddImageData(image);
-               }
-               
-               if (mvtk2Dbaseview!=NULL)
-               {
                        mvtk2Dbaseview->SetImageToVtkViewer(image);
-               }
-               
-               if (mvtkmpr2Dview_X!=NULL)
-               {
-                       mvtkmpr2Dview_X->SetImageToVtkViewer(image);
-               }
-               if (mvtkmpr2Dview_Y!=NULL)
-               {
-                       mvtkmpr2Dview_Y->SetImageToVtkViewer(image);
-               }
-               if (mvtkmpr2Dview_Z!=NULL)
-               {
-                       mvtkmpr2Dview_Z->SetImageToVtkViewer(image);
-               }
-               
-               if (mvtkplane2Dview!=NULL)
-               {
-                       // ???  EED 10 oct 2012
-               }
-               if (mwxsphereview!=NULL)
-               {
-                       mwxsphereview->SetImage();
-               }
-               if (mwxvtkclipping3Dview!=NULL)
-               {
-                       mwxvtkclipping3Dview->GetVtkClipping3DDataViewer()->SetImage();
-               }
-               
-               if (mwxvtkmpr3Dview!=NULL)
-               {
-                       mwxvtkmpr3Dview->SetImage();
-               }
+       }       
+       if (mvtkmpr2Dview_X!=NULL)
+       {
+               mvtkmpr2Dview_X->SetImageToVtkViewer(image);
+       }
+       if (mvtkmpr2Dview_Y!=NULL)
+       {
+               mvtkmpr2Dview_Y->SetImageToVtkViewer(image);
+       }
+       if (mvtkmpr2Dview_Z!=NULL)
+       {
+               mvtkmpr2Dview_Z->SetImageToVtkViewer(image);
+       }       
+       if (mvtkplane2Dview!=NULL)
+       {
+               // ???  EED 10 oct 2012
+       }
+       if (mwxsphereview!=NULL)
+       {
+               mwxsphereview->SetImage();
+       }
+       if (mwxvtkclipping3Dview!=NULL)
+       {
+               mwxvtkclipping3Dview->GetVtkClipping3DDataViewer()->SetImage();
+       }               
+       if (mwxvtkmpr3Dview!=NULL)
+       {
+               mwxvtkmpr3Dview->SetImage();
+       }
                
 //EED 26/11/2009
 //             ConfigureVTK();
 //             RefreshView();
-
-       }
+}
 
        //-------------------------------------------------------------------------
 
 
        // -- Plane widget
        _probe->SetSourceData( imageData );
 #endif
-
        _vtkmpr3Ddataviewer->SetImage();
 }
 
 
 
 void marImageData::removeImageData(int index)
 {
-       if(index < _imagedataLST.size()){
+       if(index < _imagedataLST.size())
+       {
 
                /*vtkImageData* img = _imagedataLST[index];
                if(img->GetReferenceCount()>1){
                        img->SetReferenceCount(img->GetReferenceCount()-1);
                        //img->Delete();
                }*/
-               for(int i = index; i < _imagedataLST.size()-1; i++){                    
+               for(int i = index; i < _imagedataLST.size()-1; i++)
+               {                       
                        _imagedataLST[i] = _imagedataLST[i+1];
-               }
+               }// for
                _imagedataLST.pop_back();
                //delete img;
-       }       
+       } // if 
 }
 // ----------------------------------------------------------------------------------------------
 int marImageData::GetXOriginal(int value)