LoadRangeImage Class Reference

#include <wxReadingPriorityPanel.h>

Inheritance diagram for LoadRangeImage:
Inheritance graph
[legend]
Collaboration diagram for LoadRangeImage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LoadRangeImage (wxWindow *parent, marFilesBase *marfilesbase)
virtual ~LoadRangeImage ()
void OnSliceActual (wxScrollEvent &event)
void OnBtnStart (wxCommandEvent &event)
void OnBtnEnd (wxCommandEvent &event)
void Reset ()
void RefreshSlice ()
void SetActualSlice (int actual)
int GetActualSlice ()
void ResetActualSlice ()
virtual void CallBackOnMouseWheel (wxMouseEvent &event)
void Start ()
void ForceToFinisReadActiveImages ()
void GetROI (int extent[6])
void SetStartEnd (int start, int end)
void OnBarrange (wxCommandEvent &event)
void OnActualChange_BarRange (wxCommandEvent &event)
void OnStartChange_BarRange (wxCommandEvent &event)
void OnEndChange_BarRange (wxCommandEvent &event)
void OnBarMoved_BarRange (wxCommandEvent &event)
void OnSelectionEnd_BarRange (wxCommandEvent &event)
void OnTimer (wxTimerEvent &event)

Private Member Functions

void ResetLoadRegion ()
void _Start ()
void _Stop ()
void SetStartSlice (int value)
void SetEndSlice (int value)
virtual void CallBackOnLeftDClick (wxMouseEvent &event)

Private Attributes

wxTimer * _timer
bool reseteableActual
int _toShowSlice
int _maxZ
marFilesBase_marfilesbase
int _startSlice
int _endSlice
BarLoading_bar
mBarRange_sl_barRange_ROI
PriorityLoadImageBar_priorityLoadImageBar
AdminThreadEED_adminThreadEED
MyThread_mythread
wxFlexGridSizer * _sizer1a
wxButton * _btnStart
wxButton * _btnEnd
wxStaticText * _textActual

Detailed Description

Definition at line 215 of file wxReadingPriorityPanel.h.


Constructor & Destructor Documentation

LoadRangeImage::LoadRangeImage ( wxWindow *  parent,
marFilesBase marfilesbase 
)

Definition at line 666 of file wxReadingPriorityPanel.cpp.

References _adminThreadEED, _bar, _marfilesbase, _mythread, _priorityLoadImageBar, _sl_barRange_ROI, _textActual, _timer, OnActualChange_BarRange(), OnBarMoved_BarRange(), OnBarrange(), OnEndChange_BarRange(), OnSelectionEnd_BarRange(), OnStartChange_BarRange(), OnTimer(), and reseteableActual.

00667 : wxPanel(parent, -1)
00668 {
00669         _marfilesbase           = marfilesbase;
00670         
00671     wxPanel *panel              = new wxPanel(this, -1);
00672         int wx=550;
00673         _bar                            = new BarLoading(panel,wx-10,15);
00674         //SIL//_barRange                        = new BarRange(panel,wx-10,5);
00675         //SIL//
00676         _sl_barRange_ROI        = new mBarRange(panel,wx-10 ,70);
00677         _sl_barRange_ROI-> SetOrientation(true);
00678         _sl_barRange_ROI -> setVisibleLabels ( true );
00679         _sl_barRange_ROI -> setActiveStateTo ( true );  
00680         _sl_barRange_ROI -> setDeviceBlitStart (2,2);
00681         _sl_barRange_ROI -> setDeviceEndMargin(0);
00682         _sl_barRange_ROI -> SetTrianglesHalfWidth(5);
00683 
00684         
00685         parent->SetBackgroundColour(wxColour(255,255,255 )) ;
00686         panel->SetBackgroundColour(parent-> GetBackgroundColour());
00687 
00688 /*
00689         parent->SetBackgroundColour(wxColour(255,0,0 )) ;
00690         panel->SetBackgroundColour(wxColour(0,255,0 )) ;*/
00691         /*
00692         panel->SetBackgroundColour(wxColour(0,0,0 ));
00693         parent->SetBackgroundColour(wxColour(255,0,0 ));
00694         (parent->GetParent())->SetBackgroundColour(wxColour(0,255,0 )) ;
00695         ((parent->GetParent())->GetParent())->SetBackgroundColour(wxColour(0,0,255 )) ;*/
00696         
00697 
00698         _sl_barRange_ROI-> setBackgroundColor( parent-> GetBackgroundColour()/*wxColour(255,255,255 )*/);
00699         reseteableActual =true;
00700 
00701 
00702 /*_//SIL//
00703         _sldActual                      = new wxSlider(panel,-1,0,0,10000,wxDefaultPosition,wxSize(wx-10,20),wxSL_HORIZONTAL);
00704         
00705         _btnStart                       = new wxButton(panel,-1,_T("Start:"),wxDefaultPosition, wxSize(70,20) );
00706         _btnEnd                         = new wxButton(panel,-1,_T("End:"),wxDefaultPosition, wxSize(70,20) );
00707         _textActual                     = new wxStaticText(panel,-1,_T("Actual: 0000000000"));*/
00708         _textActual                     = new wxStaticText(panel,-1,_T("  "));
00709 
00710 //EEDxx2.4
00711 //      _sldActual      ->SetSize(wx-10,20);
00712 //      _btnStart       ->SetSize(70,20);
00713 //      _btnEnd         ->SetSize(70,20);
00714 
00715         //SIL//_sizer1a = new wxFlexGridSizer(1);
00716         //SIL//_sizer1a->Add(_btnStart                                          );
00717         //SIL//_sizer1a->Add(_textActual ,wxALIGN_CENTER,0      );
00718         //SIL//_sizer1a->Add(_btnEnd                                            );
00719 
00720 //      _btnStart       ->Show(true);
00721 //      _btnEnd         ->Show(true);
00722 
00723         //SIL//_sizer1a->Show(_btnStart, false);
00724         //SIL//_sizer1a->Show(_btnEnd, false);
00725 
00726 
00727 //      _sizer1a = new wxFlexGridSizer(1);
00728 //      _sizer1a->Add(_textActual ,wxALIGN_CENTER,0     );
00729 
00730         wxFlexGridSizer *sizer1 = new wxFlexGridSizer(1);
00731 //      sizer1->AddGrowableRow(1);
00732 //      wxBoxSizer *sizer1 =  new wxBoxSizer(wxVERTICAL );
00733         //SIL//sizer1->Add(_sldActual);
00734         sizer1->Add(_bar);
00735         //SIL//sizer1->Add(_barRange);
00736         //SIL//
00737         sizer1->Add(_sl_barRange_ROI,1,wxEXPAND,0);
00738 
00739         wxFlexGridSizer *sizer = new wxFlexGridSizer(2);
00740 //      sizer -> AddGrowableRow(1);//SIL//
00741 //      sizer->Add(_sizer1a, 1, wxALL , 5 );
00742         sizer->Add(_textActual);
00743         sizer->Add(sizer1,1,wxEXPAND,0);
00744 
00745 
00746 
00747         /*wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
00748         sizer->Add(_bar, 0, wxEXPAND);  
00749         sizer->Add(_sl_barRange_ROI, 0, wxEXPAND);*/
00750 
00751 
00752 /*//SIL//
00753         Connect(_btnStart->GetId()  , wxEVT_COMMAND_BUTTON_CLICKED      , (wxObjectEventFunction) (wxCommandEventFunction) &LoadRangeImage::OnBtnStart          );
00754         Connect(_btnEnd->GetId()        , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) (wxCommandEventFunction) &LoadRangeImage::OnBtnEnd                    );
00755 */
00756         //Connect(_sldActual->GetId() , wxEVT_COMMAND_SLIDER_UPDATED    , (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) &LoadRangeImage::OnSliceActual      );
00757         //SIL//
00758         Connect(_sl_barRange_ROI->GetId(),wxEVT_TSBAR,(wxObjectEventFunction) (wxCommandEventFunction) &LoadRangeImage::OnBarrange );
00759         Connect(_sl_barRange_ROI->GetId(),wxEVT_TSBAR_START,(wxObjectEventFunction) (wxCommandEventFunction)  &LoadRangeImage::OnStartChange_BarRange );
00760         Connect(_sl_barRange_ROI->GetId(),wxEVT_TSBAR_END,(wxObjectEventFunction) (wxCommandEventFunction)  &LoadRangeImage::OnEndChange_BarRange );
00761         Connect(_sl_barRange_ROI->GetId(),wxEVT_TSBAR_ACTUAL,(wxObjectEventFunction) (wxCommandEventFunction)  &LoadRangeImage::OnActualChange_BarRange );
00762         Connect(_sl_barRange_ROI->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction)  &LoadRangeImage::OnBarMoved_BarRange );
00763         Connect(_sl_barRange_ROI->GetId(),wxEVT_SELECTION_END,(wxObjectEventFunction) (wxCommandEventFunction)  &LoadRangeImage::OnSelectionEnd_BarRange );
00764 
00765         // EED
00766         _timer=NULL;
00767 #if defined(WIN32)
00768         //...
00769 #else
00770     _timer = new wxTimer(this);
00771         _timer->Start(100);
00772     Connect( _timer->GetId(), wxEVT_TIMER , (wxObjectEventFunction) (wxTimerEventFunction)  &LoadRangeImage::OnTimer );
00773 #endif
00774 
00775 
00776         panel->SetSizer(sizer);
00777         panel->SetAutoLayout( TRUE );
00778 
00779         this->SetSize(wx,75);
00780         panel->SetSize(wx,75);
00781 
00782         _mythread                       = NULL;
00783         _priorityLoadImageBar           = new PriorityLoadImageBar(_marfilesbase,_bar);
00784         _adminThreadEED                 = new AdminThreadEED();
00785 }

Here is the call graph for this function:

LoadRangeImage::~LoadRangeImage (  )  [virtual]

Definition at line 787 of file wxReadingPriorityPanel.cpp.

References _Stop(), and _timer.

00788 {
00789         if (_timer!=NULL){
00790                 _timer->Stop();
00791                 delete _timer;
00792         }
00793         _Stop();
00794 }

Here is the call graph for this function:


Member Function Documentation

void LoadRangeImage::_Start (  )  [private]

Definition at line 851 of file wxReadingPriorityPanel.cpp.

References _adminThreadEED, _mythread, _priorityLoadImageBar, AdminThreadEED::m_critsect, AdminThreadEED::m_threads, and ResetLoadRegion().

Referenced by Start().

00852 {
00853 
00854         ResetLoadRegion();
00855         _mythread = new MyThread (_priorityLoadImageBar,_adminThreadEED);
00856         _mythread->Create();
00857         wxCriticalSectionLocker enter(_adminThreadEED->m_critsect);
00858         _adminThreadEED->m_threads.Add(_mythread);
00859         if ( _mythread->Run() != wxTHREAD_NO_ERROR ){
00860                 wxLogError(wxT("Can't start thread!"));
00861         }
00862 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::_Stop (  )  [private]

Definition at line 864 of file wxReadingPriorityPanel.cpp.

References _adminThreadEED, _mythread, AdminThreadEED::m_critsect, and AdminThreadEED::m_threads.

Referenced by ~LoadRangeImage().

00865 {
00866 
00867     _adminThreadEED->m_critsect.Enter();
00868     // stop the last thread
00869     if ( _adminThreadEED->m_threads.IsEmpty() ){
00870         //wxLogError(wxT("No thread to stop!"));
00871        _adminThreadEED->m_critsect.Leave();
00872     } else {
00873         wxThread *_mythread = _adminThreadEED->m_threads.Last();
00874         // it's important to leave critical section before calling Delete()
00875         // because delete will (implicitly) call OnExit() which also tries
00876         // to enter the same crit section - would dead lock.
00877         _adminThreadEED->m_critsect.Leave();
00878         _mythread->Delete();
00879     }
00880 
00881 }

Here is the caller graph for this function:

void InterfaceVtkPanelWidgets::CallBackOnLeftDClick ( wxMouseEvent &  event  )  [virtual, inherited]

Reimplemented in wxQuantificationWidget, wxQuantificationWidgetCT, and wxSurfaceWidget.

Definition at line 24 of file InterfaceVtkPanelWidgets.cxx.

Referenced by vtk3DSurfaceWidget::OnLeftDClick().

00025 {
00026 }

Here is the caller graph for this function:

void LoadRangeImage::CallBackOnMouseWheel ( wxMouseEvent &  event  )  [virtual]

Reimplemented from InterfaceVtkPanelWidgets.

Definition at line 1021 of file wxReadingPriorityPanel.cpp.

01022 {
01023         /* //SIL ImageViewer no existe//int actual = _imageViewerWidget->GetZSlice();
01024         if (actual<_sl_barRange_ROI->GetActual()) {
01025                 actual = _sl_barRange_ROI->GetActual();
01026         }
01027         if (actual>_sl_barRange_ROI->GetEnd()) {
01028                 actual = _sl_barRange_ROI->GetEnd();
01029         }
01030         _sl_barRange_ROI->SetActual( actual );
01031         ResetLoadRegion();
01032         RefreshSlice();
01033 */
01034         /*int actual = _imageViewerWidget->GetZSlice();
01035         if (actual<_sldStart->GetValue()) {
01036                 actual = _sldStart->GetValue();
01037         }
01038         if (actual>_sldEnd->GetValue()) {
01039                 actual = _sldEnd->GetValue();
01040         }
01041         _sldActual->SetValue( actual );
01042         ResetLoadRegion();
01043         RefreshSlice();*/
01044 
01045 }

void LoadRangeImage::ForceToFinisReadActiveImages (  ) 

Definition at line 1047 of file wxReadingPriorityPanel.cpp.

References _endSlice, _marfilesbase, _priorityLoadImageBar, _startSlice, marFilesBase::GetMsgLstFile(), and PriorityLoop::WaitUntil_segment_isDone().

Referenced by wxMaracasImageBrowser02::ForceToFinisReadActiveImages().

01048 {
01049         int s=_startSlice;
01050         int e=_endSlice;
01051 
01052         _priorityLoadImageBar->WaitUntil_segment_isDone(s,e,true);
01053 
01054 
01055 //EEDx44
01056         std::string msgLstFile( _marfilesbase->GetMsgLstFile() );
01057         if ( msgLstFile!="")
01058         {
01059                 wxDialog *dialog = new wxDialog( this , -1, wxString(_T("The following files doesn't exist:")), wxDefaultPosition, wxSize(550,300),  wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER );                        
01060                 wxTextCtrl *textCtrl = new wxTextCtrl(dialog, -1, wxString (msgLstFile.c_str(), wxConvUTF8) ,wxDefaultPosition , wxSize(100,100) , wxTE_MULTILINE | wxTE_READONLY );
01061                 textCtrl->SetSelection(0,0);
01062                 wxBoxSizer *sizer       = new wxBoxSizer(wxVERTICAL  );
01063                 sizer->Add( textCtrl , 1, wxALL|wxEXPAND, 0);
01064                 dialog->SetAutoLayout(true);
01065                 dialog->SetSizer( sizer );      // use the sizer for layout
01066                 dialog->Layout(); 
01067 //EEDxx2.4
01068 //              dialog->FitInside();
01069                 dialog->ShowModal();
01070         }
01071 
01072 
01073 
01074 
01075 }

Here is the call graph for this function:

Here is the caller graph for this function:

int LoadRangeImage::GetActualSlice (  ) 

Definition at line 1102 of file wxReadingPriorityPanel.cpp.

References _toShowSlice.

Referenced by wxMaracasImageBrowser02::OnRefreshView2(), and wxMaracasImageBrowser02::Refresh().

01103 {
01104         return _toShowSlice;/*_sl_barRange_ROI->GetActual()*/; 
01105 }

Here is the caller graph for this function:

void LoadRangeImage::GetROI ( int  extent[6]  ) 

Definition at line 1077 of file wxReadingPriorityPanel.cpp.

References _endSlice, and _startSlice.

Referenced by wxMaracasImageBrowser02::GetROI().

01078 {
01079         extent[4]=_startSlice;
01080         extent[5]=_endSlice;
01081 }

Here is the caller graph for this function:

void LoadRangeImage::OnActualChange_BarRange ( wxCommandEvent &  event  ) 

Definition at line 1121 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, _toShowSlice, mBarRange::GetActual(), RefreshSlice(), and ResetLoadRegion().

Referenced by LoadRangeImage().

01122 {
01123         //reseteableActual =true;
01124         _toShowSlice = _sl_barRange_ROI->GetActual();
01125         ResetLoadRegion();
01126         RefreshSlice(); 
01127 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::OnBarMoved_BarRange ( wxCommandEvent &  event  ) 

Definition at line 1145 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, mBarRange::GetEnd(), mBarRange::GetStart(), RefreshSlice(), ResetLoadRegion(), SetEndSlice(), and SetStartSlice().

Referenced by LoadRangeImage().

01146 {
01147         SetEndSlice( _sl_barRange_ROI->GetEnd() );
01148         SetStartSlice( _sl_barRange_ROI->GetStart() );
01149         ResetLoadRegion();
01150         RefreshSlice();
01151 
01152 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::OnBarrange ( wxCommandEvent &  event  ) 

Definition at line 1117 of file wxReadingPriorityPanel.cpp.

Referenced by LoadRangeImage().

01118 {
01119         
01120 }

Here is the caller graph for this function:

void LoadRangeImage::OnBtnEnd ( wxCommandEvent &  event  ) 

Definition at line 913 of file wxReadingPriorityPanel.cpp.

00914 {
00915         //SIL// metodo para quitar
00916         /*SetEndSlice( _sldActual->GetValue() );
00917         ResetLoadRegion();
00918         RefreshSlice();*/
00919 }

void LoadRangeImage::OnBtnStart ( wxCommandEvent &  event  ) 

Definition at line 904 of file wxReadingPriorityPanel.cpp.

00905 {
00906         //SIL// metodo para quitar
00907         /*SetStartSlice( _sldActual->GetValue() );
00908         ResetLoadRegion();
00909         RefreshSlice();*/
00910 }

void LoadRangeImage::OnEndChange_BarRange ( wxCommandEvent &  event  ) 

Definition at line 1137 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, _toShowSlice, mBarRange::GetEnd(), RefreshSlice(), reseteableActual, ResetLoadRegion(), and SetEndSlice().

Referenced by LoadRangeImage().

01138 {
01139         reseteableActual =false;
01140         _toShowSlice = _sl_barRange_ROI->GetEnd();
01141         SetEndSlice( _sl_barRange_ROI->GetEnd() );
01142         ResetLoadRegion();
01143         RefreshSlice();
01144 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::OnSelectionEnd_BarRange ( wxCommandEvent &  event  ) 

Definition at line 1153 of file wxReadingPriorityPanel.cpp.

References reseteableActual.

Referenced by LoadRangeImage().

01154 {
01155         reseteableActual = true;
01156 }

Here is the caller graph for this function:

void LoadRangeImage::OnSliceActual ( wxScrollEvent &  event  ) 

Definition at line 894 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, _toShowSlice, mBarRange::GetActual(), RefreshSlice(), and ResetLoadRegion().

00895 {
00896         //SIL// metodo para quitar
00897         _toShowSlice = _sl_barRange_ROI->GetActual();
00898         ResetLoadRegion();
00899         RefreshSlice();
00900 }

Here is the call graph for this function:

void LoadRangeImage::OnStartChange_BarRange ( wxCommandEvent &  event  ) 

Definition at line 1128 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, _toShowSlice, mBarRange::GetStart(), RefreshSlice(), reseteableActual, ResetLoadRegion(), and SetStartSlice().

Referenced by LoadRangeImage().

01129 {       
01130         reseteableActual =false;
01131         _toShowSlice = _sl_barRange_ROI->GetStart();
01132         SetStartSlice( _sl_barRange_ROI->GetStart() );
01133         ResetLoadRegion();
01134         RefreshSlice();
01135 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::OnTimer ( wxTimerEvent &  event  ) 

Definition at line 1159 of file wxReadingPriorityPanel.cpp.

References _bar, and RefreshSlice().

Referenced by LoadRangeImage().

01160 {
01161 //  EED  used in linux  (see constructor)
01162         _bar->Refresh(false);
01163         _bar->Update();
01164         RefreshSlice();
01165 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::RefreshSlice (  ) 

Definition at line 984 of file wxReadingPriorityPanel.cpp.

References _priorityLoadImageBar, _sl_barRange_ROI, _toShowSlice, mBarRange::RefreshForce(), and PriorityLoop::WaitUntil_i_isDone().

Referenced by OnActualChange_BarRange(), OnBarMoved_BarRange(), OnEndChange_BarRange(), OnSliceActual(), OnStartChange_BarRange(), OnTimer(), wxMaracasImageBrowser02::Refresh(), Reset(), SetActualSlice(), SetStartEnd(), and Start().

00985 {
00986 //SIL// _priorityLoadImageBar->WaitUntil_i_isDone( _sldActual->GetValue() );
00987         _priorityLoadImageBar->WaitUntil_i_isDone( _toShowSlice );
00988 
00989         wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12122);
00990         this->GetParent()->ProcessEvent(newevent);
00991 /* //SIL//
00992         wxString text;  
00993         //SIL//text.Printf(_T("Actual: %d "), _sldActual->GetValue() );
00994         text.Printf(_T("Start: %d\n Actual: %d\n End: %d"), _sl_barRange_ROI->GetStart(),_sl_barRange_ROI->GetActual(),_sl_barRange_ROI->GetEnd() );
00995         _textActual->SetLabel(text);*/
00996         
00997         //SIL// Para borrar las lineas de barrange
00998         /*_barRange->SetMax(_maxZ);
00999         _barRange->SetActual( _sldActual->GetValue() );
01000         _barRange->SetStart(_startSlice);
01001         _barRange->SetEnd(_endSlice);
01002         _barRange->RefreshForce();*/
01003 
01004         //SIL//
01005         // EED
01006 //      _sl_barRange_ROI->SetMax(_maxZ);
01007         //_sl_barRange_ROI->SetActual(  _sldActual->GetValue() );
01008 //      _sl_barRange_ROI->SetStart(_startSlice);
01009 //      _sl_barRange_ROI->SetEnd(_endSlice);
01010         _sl_barRange_ROI->RefreshForce();
01011 
01012 //EED 28 Fev 2008
01013 //      _bar->Refresh();
01014 //      _bar->Update();
01015 
01016    Refresh(false);
01017 //      _imageViewerWidget->SetZSlice( _sldActual->GetValue()  );
01018 //      _imageViewerWidget->Render();
01019 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::Reset (  ) 

Definition at line 930 of file wxReadingPriorityPanel.cpp.

References _maxZ, RefreshSlice(), SetEndSlice(), and SetStartSlice().

Referenced by wxMaracasImageBrowser02::OnBtnResetRoi(), and wxMaracasImageBrowser02::SetROI().

00931 {
00932         int delta= (int) (_maxZ*0.1);
00933         SetStartSlice( 0 + delta );
00934         SetEndSlice( _maxZ - delta );
00935 
00936 //EEDxx2.4
00937 //      _btnStart       ->Show(true);
00938 //      _btnEnd         ->Show(true);
00939 
00940         //SIL//_sizer1a->Show(_btnStart, true );
00941         //SIL//_sizer1a->Show(_btnEnd   , true );
00942 //    _sizer1a->Layout();       
00943         RefreshSlice();
00944 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::ResetActualSlice (  ) 

Definition at line 1108 of file wxReadingPriorityPanel.cpp.

References _sl_barRange_ROI, _toShowSlice, mBarRange::GetActual(), and reseteableActual.

01109 {
01110         if( reseteableActual )
01111                 _toShowSlice = _sl_barRange_ROI->GetActual();
01112 }

Here is the call graph for this function:

void LoadRangeImage::ResetLoadRegion (  )  [private]

Definition at line 797 of file wxReadingPriorityPanel.cpp.

References _endSlice, _maxZ, _priorityLoadImageBar, _startSlice, _toShowSlice, and PriorityLoop::SetStartEndActualMax().

Referenced by _Start(), OnActualChange_BarRange(), OnBarMoved_BarRange(), OnEndChange_BarRange(), OnSliceActual(), OnStartChange_BarRange(), SetActualSlice(), and SetStartEnd().

00798 {
00799         int s,e,a;
00800         s=_startSlice;
00801         e=_endSlice;
00802         //SIL//a=_sldActual->GetValue();
00803         //a=_sl_barRange_ROI->GetActual();
00804         a = _toShowSlice;
00805         if ((a<s) || (a>e))
00806         {
00807                 s=0;
00808                 e=_maxZ;
00809         } 
00810         _priorityLoadImageBar->SetStartEndActualMax(s,e,a,0,_maxZ);
00811 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::SetActualSlice ( int  actual  ) 

Definition at line 1083 of file wxReadingPriorityPanel.cpp.

References _endSlice, _sl_barRange_ROI, _startSlice, _toShowSlice, RefreshSlice(), ResetLoadRegion(), and mBarRange::SetActual().

Referenced by wxMaracasImageBrowser02::Refresh().

01084 {
01085 
01086         if ( actual > _endSlice ){
01087                 actual=_endSlice;
01088         }
01089         if ( actual < _startSlice ){
01090                 actual = _startSlice;
01091         }
01092 
01093         //SIL//_sldActual->SetValue( actual  );//SIL// para quitar esta linea
01094         //SIL//
01095         _sl_barRange_ROI->SetActual( actual);//de pronto no se necesita aca
01096         _toShowSlice=actual;
01097 
01098         ResetLoadRegion();
01099         RefreshSlice();
01100 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::SetEndSlice ( int  value  )  [private]

Definition at line 969 of file wxReadingPriorityPanel.cpp.

References _endSlice, _sl_barRange_ROI, _startSlice, mBarRange::RefreshForce(), and mBarRange::SetEnd().

Referenced by OnBarMoved_BarRange(), OnEndChange_BarRange(), Reset(), SetStartEnd(), and Start().

00970 {
00971         if (value>_startSlice){
00972                 _endSlice       = value;
00973                 /*wxString txt;
00974                 txt.Printf(_T("%d"),_endSlice);
00975                 _textActual->SetLabel(txt);*/
00976                 //SIL//_btnEnd->SetLabel(_T("End:  ")+txt);
00977                 _sl_barRange_ROI->SetEnd(_endSlice);
00978                 _sl_barRange_ROI->RefreshForce(); 
00979 
00980         }
00981 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::SetStartEnd ( int  start,
int  end 
)

Definition at line 921 of file wxReadingPriorityPanel.cpp.

References RefreshSlice(), ResetLoadRegion(), SetEndSlice(), and SetStartSlice().

Referenced by wxMaracasImageBrowser02::SetROI().

00922 {
00923         SetStartSlice( start );
00924         SetEndSlice( end );
00925         ResetLoadRegion();
00926         RefreshSlice();
00927 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::SetStartSlice ( int  value  )  [private]

Definition at line 947 of file wxReadingPriorityPanel.cpp.

References _endSlice, _maxZ, _sl_barRange_ROI, _startSlice, mBarRange::RefreshForce(), mBarRange::SetMax(), and mBarRange::SetStart().

Referenced by OnBarMoved_BarRange(), OnStartChange_BarRange(), Reset(), SetStartEnd(), and Start().

00948 {
00949         if (value<_endSlice){
00950                 _startSlice     = value;
00951                 /*wxString txt;
00952                 txt.Printf(_T("%d"),_startSlice);
00953                 _textActual->SetLabel(txt);*/
00954                 
00955                 //SIL// para quitar las siguientes 4 lineas
00956                 /*
00957                 _btnStart->SetLabel(_T("Start:  ")+txt);
00958                 _barRange->SetMax(_maxZ);
00959                 _barRange->SetStart(_startSlice);
00960                 _barRange->RefreshForce();*/
00961 
00962                 //SIL//
00963                 _sl_barRange_ROI->SetMax(_maxZ);
00964                 _sl_barRange_ROI->SetStart(_startSlice);
00965                 _sl_barRange_ROI->RefreshForce(); 
00966         }
00967 }

Here is the call graph for this function:

Here is the caller graph for this function:

void LoadRangeImage::Start (  ) 

Definition at line 814 of file wxReadingPriorityPanel.cpp.

References _bar, _endSlice, _marfilesbase, _maxZ, _sl_barRange_ROI, _Start(), _startSlice, _toShowSlice, mBarRange::GetActual(), marFilesBase::getVolume(), RefreshSlice(), marFilesBase::ResetLstFileNotReaded(), SetEndSlice(), and SetStartSlice().

Referenced by wxMaracasImageBrowser02::Start().

00815 {
00816 
00817     vtkImageData *vol = _marfilesbase->getVolume( )->castVtk();
00818         int dim[3];
00819         vol->GetDimensions(dim);
00820         _maxZ=dim[2]-1;
00821 
00822         _startSlice     =       0;
00823         _endSlice       =       _maxZ;
00824 
00825         this->SetStartSlice(_startSlice);
00826         this->SetEndSlice(_endSlice);
00827 
00828 
00829         _bar ->                 SetSizeData(_maxZ);
00830 //SIL// Para quitar luego als siguientes dos lineas
00831         /*_sldActual -> SetRange(0, _maxZ);
00832         _sldActual ->   SetValue( _maxZ/2 );*/
00833 
00834         //SIL//
00835         _sl_barRange_ROI -> setRepresentedValues (0,_maxZ);
00836         _sl_barRange_ROI -> SetActual(_maxZ/2);
00837         _sl_barRange_ROI -> RefreshForce();     
00838 
00839 
00840         SetStartSlice( 0 );
00841         SetEndSlice( _maxZ );
00842         _toShowSlice = _sl_barRange_ROI->GetActual();
00843         RefreshSlice();
00844 
00845 //EEDx44
00846         _marfilesbase->ResetLstFileNotReaded();
00847 
00848         _Start();
00849 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 273 of file wxReadingPriorityPanel.h.

Referenced by _Start(), _Stop(), and LoadRangeImage().

Definition at line 265 of file wxReadingPriorityPanel.h.

Referenced by LoadRangeImage(), OnTimer(), and Start().

wxButton* LoadRangeImage::_btnEnd [private]

Definition at line 278 of file wxReadingPriorityPanel.h.

wxButton* LoadRangeImage::_btnStart [private]

Definition at line 277 of file wxReadingPriorityPanel.h.

Definition at line 258 of file wxReadingPriorityPanel.h.

Referenced by ForceToFinisReadActiveImages(), LoadRangeImage(), and Start().

int LoadRangeImage::_maxZ [private]

Definition at line 257 of file wxReadingPriorityPanel.h.

Referenced by Reset(), ResetLoadRegion(), SetStartSlice(), and Start().

Definition at line 274 of file wxReadingPriorityPanel.h.

Referenced by _Start(), _Stop(), and LoadRangeImage().

wxFlexGridSizer* LoadRangeImage::_sizer1a [private]

Definition at line 276 of file wxReadingPriorityPanel.h.

wxStaticText* LoadRangeImage::_textActual [private]

Definition at line 279 of file wxReadingPriorityPanel.h.

Referenced by LoadRangeImage().

wxTimer* LoadRangeImage::_timer [private]

Definition at line 254 of file wxReadingPriorityPanel.h.

Referenced by LoadRangeImage(), and ~LoadRangeImage().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1