PriorityLoadImageBar Class Reference

#include <wxReadingPriorityPanel.h>

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

List of all members.

Public Member Functions

 PriorityLoadImageBar (marFilesBase *marfilesbase, BarLoading *bar)
virtual ~PriorityLoadImageBar ()
void Action_i (int i)
virtual void RefreshForce ()
void SetStartEndActualMax (int start, int end, int actual, int deltaImg, int maxImages)
void Iteration ()
void InitLoop ()
void StopLoop ()
bool IsLoop ()
void WaitUntil_i_isDone (int i)
void WaitUntil_segment_isDone (int start, int end, bool forceEndLoopRegion=true)
void ForceEndLoopRegion ()

Private Attributes

marFilesBase_marfilesbase
BarLoading_bar

Detailed Description

Definition at line 139 of file wxReadingPriorityPanel.h.


Constructor & Destructor Documentation

PriorityLoadImageBar::PriorityLoadImageBar ( marFilesBase marfilesbase,
BarLoading bar 
)

Definition at line 275 of file wxReadingPriorityPanel.cpp.

References _bar, and _marfilesbase.

00275                                                                                      {
00276         _marfilesbase=marfilesbase;
00277         _bar=bar;
00278 }

PriorityLoadImageBar::~PriorityLoadImageBar (  )  [virtual]

Definition at line 280 of file wxReadingPriorityPanel.cpp.

00280                                            {
00281 }


Member Function Documentation

void PriorityLoadImageBar::Action_i ( int  i  )  [virtual]

Reimplemented from PriorityLoop.

Definition at line 283 of file wxReadingPriorityPanel.cpp.

References _bar, _marfilesbase, marFilesBase::getVolume(), marFilesBase::loadImage(), and BarLoading::SetI().

00283                                         {
00284 
00285         if (_bar!=NULL){
00286 
00287 // EED 09 Oct 2007 
00288                 _bar->SetI(i);
00289 
00290                 #if defined(WIN32)
00291 //                      _bar->Refresh(false);
00292                         //_bar->Paint();
00293 //                      Sleep(1);
00294                 #else
00295 //                      _bar->Refresh(false);
00296 //                      _bar->Update();
00297 //                      _bar->Paint();
00298 //                      usleep(1000);
00299                 #endif
00300         }
00301 
00302 
00303         if (_marfilesbase!=NULL){
00304                 _marfilesbase->loadImage(i);
00305                 vtkImageData *imagedata = _marfilesbase->getVolume()->castVtk();
00306                 imagedata->Update();
00307         }
00308 }

Here is the call graph for this function:

void PriorityLoop::ForceEndLoopRegion (  )  [inherited]

Definition at line 52 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_forceReadRegion.

Referenced by PriorityLoop::WaitUntil_segment_isDone().

00052                                      {
00053         _forceReadRegion=true;
00054 }

Here is the caller graph for this function:

void PriorityLoop::InitLoop (  )  [inherited]

Definition at line 57 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_counterReading, PriorityLoop::_loadingSerie, PriorityLoop::Create_Empty_Vector(), PriorityLoop::InitConfiguration(), and PriorityLoop::NeedToChange().

Referenced by MyThread::Entry().

00057                            {
00058         _loadingSerie = true;
00059         NeedToChange();
00060         Create_Empty_Vector();
00061         InitConfiguration();
00062         _counterReading = 0;
00063 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool PriorityLoop::IsLoop (  )  [inherited]

Definition at line 48 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_loadingSerie.

Referenced by MyThread::Entry().

00048                          {
00049         return _loadingSerie;
00050 }

Here is the caller graph for this function:

void PriorityLoop::Iteration (  )  [inherited]

Definition at line 66 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_Action_i(), PriorityLoop::_counterReading, PriorityLoop::_deltaImg, PriorityLoop::_ForceEndLoopRegion(), PriorityLoop::_forceReadRegion, PriorityLoop::_loadingSerie, PriorityLoop::_maxImages, PriorityLoop::Get_i_image(), and PriorityLoop::NeedToChange().

Referenced by MyThread::Entry().

00066                             {
00067 
00068         NeedToChange();
00069 
00070         if (_forceReadRegion==false){
00071                 int ii,i=Get_i_image();
00072                 for (ii=i-_deltaImg;ii<=i+_deltaImg;ii++){
00073                         if (_Action_i( ii )==true){
00074                                 _counterReading++;
00075                         }
00076                 }
00077         } else {
00078                 _loadingSerie=_ForceEndLoopRegion();
00079         }
00080 
00081         if (_counterReading==_maxImages){
00082                 _loadingSerie=false;
00083         }
00084 
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PriorityLoadImageBar::RefreshForce (  )  [virtual]

Reimplemented from PriorityLoop.

Definition at line 310 of file wxReadingPriorityPanel.cpp.

References _bar, and BarLoading::RefreshForce().

00310                                        {
00311         _bar->RefreshForce();
00312 }

Here is the call graph for this function:

void PriorityLoop::SetStartEndActualMax ( int  start,
int  end,
int  actual,
int  deltaImg,
int  maxImages 
) [inherited]

Definition at line 114 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_needToChange, PriorityLoop::_tactual, PriorityLoop::_tdeltaImg, PriorityLoop::_tend, PriorityLoop::_tmaxImages, and PriorityLoop::_tstart.

Referenced by LoadRangeImage::ResetLoadRegion().

00114                                                                                                 {
00115         _tstart         = start;
00116         _tend           = end;
00117         _tactual        = actual;
00118         _tdeltaImg      = deltaImg;
00119         _tmaxImages     = maxImages;
00120         _needToChange = true;
00121 }

Here is the caller graph for this function:

void PriorityLoop::StopLoop (  )  [inherited]

Definition at line 44 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_loadingSerie.

Referenced by MyThread::OnExit().

00044                            {
00045         _loadingSerie = false;
00046 }

Here is the caller graph for this function:

void PriorityLoop::WaitUntil_i_isDone ( int  i  )  [inherited]

Definition at line 241 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_deltaImg, and PriorityLoop::WaitUntil_segment_isDone().

Referenced by LoadRangeImage::RefreshSlice().

00241                                           {
00242         WaitUntil_segment_isDone(i-_deltaImg,i+_deltaImg,false);
00243 }

Here is the call graph for this function:

Here is the caller graph for this function:

void PriorityLoop::WaitUntil_segment_isDone ( int  start,
int  end,
bool  forceEndLoopRegion = true 
) [inherited]

Definition at line 245 of file wxReadingPriorityPanel.cpp.

References PriorityLoop::_loadingSerie, PriorityLoop::_maxImages, PriorityLoop::_vecIdImage, PriorityLoop::ForceEndLoopRegion(), and PriorityLoop::RefreshForce().

Referenced by LoadRangeImage::ForceToFinisReadActiveImages(), and PriorityLoop::WaitUntil_i_isDone().

00245                                                                                      {
00246         if (forceEndLoopRegion==true) { ForceEndLoopRegion(); }
00247         if (_loadingSerie==true){
00248                 int s=start,e=end;
00249                 if (s<0){
00250                         s=0;
00251                 }
00252                 if (e>_maxImages-1){
00253                         e=_maxImages-1;
00254                 }
00255                 bool ok=false;
00256                 while (ok==false){
00257                         int i;
00258                         ok=true;
00259                         for (i=s;i<=e;i++){
00260                                 ok = ok && _vecIdImage[i];
00261                         }
00262                         if (ok==false) { 
00263                                 RefreshForce();
00264                                 wxThread::Sleep(100); 
00265                         }
00266                 }
00267         }
00268 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 148 of file wxReadingPriorityPanel.h.

Referenced by Action_i(), PriorityLoadImageBar(), and RefreshForce().

Definition at line 147 of file wxReadingPriorityPanel.h.

Referenced by Action_i(), and PriorityLoadImageBar().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1