+#include <creaImageIOSystem.h>
#include <creaImageIOGimmickReaderDialog.h>
#include <creaVtkBasicSlicer.h>
int main(int argc, char* argv[])
{
+ if (argc>1)
+ {
+ int l = atoi(argv[1]);
+ creaImageIO::SetGimmickMessageLevel(l);
+ }
+
std::vector<vtkImageData*> images;
bool r = creaImageIO::GimmickReaderDialog(images,
"GimmickReaderDialog test",
ImageToLoadPtr unload = mUnloadQueue.remove_top();
MultiThreadImageReaderUser* user = unload->GetUser();
+ /*
if ((user!=0)&&(user!=this))
{
user->GetMultiThreadImageReaderUserMutex().Lock();
}
+ */
+ std::string filename = unload->GetFilename();
- GimmickMessage(5,"'" << unload->GetFilename() << "'" << std::endl);
+ GimmickMessage(5,"'" << filename << "'" << std::endl);
mTotalMem -= unload->GetImage()->GetEstimatedMemorySize();
GimmickMessage(5," ==> Total mem = "<<mTotalMem<<" Ko "<<std::endl);
-
- std::string filename = unload->GetFilename();
+
+ if (user!=0)
+ {
+ // std::cout << "unlock..."<<std::endl;
+ // user->GetMultiThreadImageReaderUserMutex().Unlock();
+ // std::cout << "event"<<std::endl;
+ user->MultiThreadImageReaderSendEvent
+ (filename,
+ MultiThreadImageReaderUser::ImageUnloaded,
+ 0);
+ // std::cout << "event ok"<<std::endl;
+
+ }
+
if (unload->Index()>=0)
{
// GimmickMessage(5,"still in queue"<<std::endl);
delete unload;
// std::cout << "delete ok."<<std::endl;
- if (user!=0)
- {
- // std::cout << "unlock..."<<std::endl;
- user->GetMultiThreadImageReaderUserMutex().Unlock();
- // std::cout << "event"<<std::endl;
- user->MultiThreadImageReaderSendEvent
- (filename,
- MultiThreadImageReaderUser::ImageUnloaded,
- 0);
- // std::cout << "event ok"<<std::endl;
-
- }
}