43 (
const std::string& filename,
47 wxMutexLocker lock(mMultiThreadImageReaderUserMutex);
49 this->OnMultiThreadImageReaderEvent(filename,type,image);
64 vtkImageData*
Read(
const std::string& filename);
97 for (
int i=0; i<number_of_threads; i++)
102 std::cout <<
" ===> Thread "<<i
103 <<
" successfully added"<< std::endl;
127 ThreadedImageReaderListType::iterator i;
133 if ( (*i)->Run() != wxTHREAD_NO_ERROR )
135 std::cout <<
"ERROR starting a thread"<< std::endl;
140 std::cout <<
" ===> Thread "<<(*i)->GetCurrentId()
141 <<
" successfully created"<< std::endl;
161 ThreadedImageReaderListType::iterator i;
165 { std::cout <<
" ===> Thread "<<(*i)->GetCurrentId()
166 <<
" successfully stopped"<< std::endl;
199 ImageMapType::iterator j;
230 if (priority > old_prio)
235 else if ( old_prio > priority )
244 std::map <std::string , std::string> &infos,std::vector<std::string> i_attr)
251 const std::string& filename,
261 ImageMapType::iterator i =
mImages.find(&itl);
285 ImageMapType::iterator i =
mImages.find(&itl);
289 if (i->first->GetImage() != 0)
300 if (pitl->
Index()>=0)
323 (
const std::string& filename,
328 (filename == mRequestedFilename))
330 mRequestedImage = image;
334 mNumberOfThreadedReadersRunning++;
340 mNumberOfThreadedReadersRunning--;
366 ImageMapType::iterator i =
mImages.find(&itl);
484 p->
GetImage()->PropagateUpdateExtent();
485 long ImMem = p->
GetImage()->GetEstimatedMemorySize();
496 " ! Exceeded max of "
502 " Only one image : cannot load AND unload it !!"
536 if (unload->
Index()>=0)
540 unload->
Index() = -1;
543 ImageMapType::iterator it =
mImages.find(unload);
571 max =
mQueue.top()->GetPriority();
576 if (max2>max) max=max2;
600 while (!TestDestroy())
627 MultiThreadImageReader::ImageMapType::iterator it =