From 9f19a134db7c02de2dee0c699bfbae69e53904c3 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 17 Jun 2019 14:09:36 +0200 Subject: [PATCH] #3218 creaImageIO Feature New Normal - vtk8itk4wx3-mingw64 --- .../bbcreaImageIOImagesChooserDialogBox.xml | 4 ---- src/creaImageIODicomImageReader.cpp | 8 -------- src/creaImageIOGimmickView.cpp | 4 ---- src/creaImageIOImageReader.cpp | 11 ----------- src/creaImageIOMultiThreadImageReader.cpp | 12 ------------ src/creaImageIOWxGimmickView.cpp | 18 ------------------ src/creaImageIOWxSimpleDlg.cpp | 2 -- 7 files changed, 59 deletions(-) diff --git a/bbtk/src/bbcreaImageIOImagesChooserDialogBox.xml b/bbtk/src/bbcreaImageIOImagesChooserDialogBox.xml index 7463747..d36ef10 100644 --- a/bbtk/src/bbcreaImageIOImagesChooserDialogBox.xml +++ b/bbtk/src/bbcreaImageIOImagesChooserDialogBox.xml @@ -80,8 +80,6 @@
 
-printf("EED ImagesChooserDialogBox Start\n");
-
 //    creaImageIO::WxSimpleDlg dlg(0,crea::std2wx(bbGetInputTitle()),"localdatabase_Descriptor.dscp","Local Database"); 
     creaImageIO::WxSimpleDlg *dlg = new creaImageIO::WxSimpleDlg(0,crea::std2wx(bbGetInputTitle()),"localdatabase_Descriptor.dscp","Local Database"); 
     dlg->SetAttrDicomTags( bbGetInputDicomTags() );
@@ -98,8 +96,6 @@ printf("EED ImagesChooserDialogBox Start\n");
 	bbSignalOutputModification(  );
 	
 	delete dlg;
-printf("EED ImagesChooserDialogBox END \n");
-	
 
     
diff --git a/src/creaImageIODicomImageReader.cpp b/src/creaImageIODicomImageReader.cpp index d97634a..a2c5ccf 100644 --- a/src/creaImageIODicomImageReader.cpp +++ b/src/creaImageIODicomImageReader.cpp @@ -82,25 +82,17 @@ namespace creaImageIO //===================================================================== vtkImageData* DicomImageReader::ReadImage(const std::string& filename) { -printf("EED DicomImageReader::ReadImage Start\n"); vtkImageData* im = 0; try { -printf("EED DicomImageReader::ReadImage 1\n"); mReader->SetFileName(filename.c_str()); -printf("EED DicomImageReader::ReadImage 2 aaaaaaaaaaaaaaaaaaaaaaaaaaa\n"); mReader->Update(); -printf("EED DicomImageReader::ReadImage 3 bbbbbbbbbbbbbbbbbbbbbbbbbbb\n"); im = vtkImageData::New(); -printf("EED DicomImageReader::ReadImage 4\n"); im->ShallowCopy(mReader->GetOutput()); -printf("EED DicomImageReader::ReadImage 5\n"); } catch (...) { -printf("EED DicomImageReader::ReadImage 6\n"); if (im!=0) im->Delete(); im = 0; } -printf("EED DicomImageReader::ReadImage End\n"); return im; } diff --git a/src/creaImageIOGimmickView.cpp b/src/creaImageIOGimmickView.cpp index 2ff7855..47aa9cb 100644 --- a/src/creaImageIOGimmickView.cpp +++ b/src/creaImageIOGimmickView.cpp @@ -464,10 +464,8 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect ////////////////////////////////////////////////////////// bool GimmickView::isSingle(const std::string i_file) { -printf("EED GimmickView::isSingle Start %s\n" , i_file.c_str() ); bool bres = true; vtkImageData* first = mReader.GetImage( i_file); -printf("EED GimmickView::isSingle 1\n" ); int dim[3]; first->GetDimensions(dim); if (dim[2] > 1) @@ -477,8 +475,6 @@ printf("EED GimmickView::isSingle 1\n" ); else { } -printf("EED GimmickView::isSingle end\n"); - return bres; } diff --git a/src/creaImageIOImageReader.cpp b/src/creaImageIOImageReader.cpp index ecba3ed..402ca63 100644 --- a/src/creaImageIOImageReader.cpp +++ b/src/creaImageIOImageReader.cpp @@ -157,7 +157,6 @@ namespace creaImageIO // Returns true iff the file is readable bool ImageReader::CanRead( const std::string& filename ) { -printf("EED ImageReader::CanRead Start\n"); bool ok = false; @@ -175,13 +174,10 @@ printf("EED ImageReader::CanRead Start\n"); { mLastFilename = filename; mLastReader = *i; -printf("EED ImageReader::CanRead %s\n",mLastReader->GetName().c_str()); break; } } } -if (ok==true) printf("EED ImageReader::CanRead true End\n"); -if (ok==false) printf("EED ImageReader::CanRead false End\n"); return ok; } //===================================================================== @@ -190,28 +186,21 @@ if (ok==false) printf("EED ImageReader::CanRead false End\n"); // Reads the file (CanRead must be called before : no test here) vtkImageData* ImageReader::ReadImage( const std::string& filename) { -printf("EED ImageReader::ReadImage Start\n"); if (mLastFilename!=filename) { -printf("EED ImageReader::ReadImage 1\n"); if (!CanRead(filename)) { -printf("EED ImageReader::ReadImage 2\n"); vtkImageData* im = vtkImageData::New(); im->ShallowCopy(mUnreadableImage); -printf("EED ImageReader::ReadImage END2\n"); return im; } // CanRead } // for mLastFilename -printf("EED ImageReader::ReadImage 3\n"); vtkImageData* i = mLastReader->ReadImage(mLastFilename); -printf("EED ImageReader::ReadImage 4\n"); if (i==NULL) { i = vtkImageData::New(); i->ShallowCopy(mUnreadableImage); } // i -printf("EED ImageReader::ReadImage END1\n"); return i; } diff --git a/src/creaImageIOMultiThreadImageReader.cpp b/src/creaImageIOMultiThreadImageReader.cpp index d0bea26..288c9e8 100644 --- a/src/creaImageIOMultiThreadImageReader.cpp +++ b/src/creaImageIOMultiThreadImageReader.cpp @@ -373,9 +373,6 @@ namespace creaImageIO vtkImageData* MultiThreadImageReader::GetImage(const std::string& filename) { - printf("EED MultiThreadImageReader::GetImage Start\n"); - - do { // wxMutexLocker lock(GetMultiThreadImageReaderUserMutex()); //mMutex); @@ -388,15 +385,11 @@ namespace creaImageIO // if (mThreadedImageReaderList.size()==0) if (true) { - printf("EED MultiThreadImageReader::GetImage 1\n"); ImageToLoad itl(this,filename); - printf("EED MultiThreadImageReader::GetImage 2\n"); ImageMapType::iterator i = mImages.find(&itl); if (i!=mImages.end()) { - printf("EED MultiThreadImageReader::GetImage 2.1\n"); ImageToLoadPtr pitl = const_cast(i->first); - printf("EED MultiThreadImageReader::GetImage 2.2\n"); // Already inserted if (pitl->GetImage() != NULL) { @@ -406,14 +399,10 @@ namespace creaImageIO } // if pitl->GetImage() } // if i - printf("EED MultiThreadImageReader::GetImage 3.1\n"); ImageToLoadPtr pitl = new ImageToLoad(this,filename,0); - printf("EED MultiThreadImageReader::GetImage 3.2\n"); mImages[pitl] = NULL; pitl->SetImage( mReader->ReadImage(filename) ); - printf("EED MultiThreadImageReader::GetImage 3.3\n"); UpdateUnloadPriority( pitl, GetMaximalPriorityWithoutLocking()+1 ); - printf("EED MultiThreadImageReader::GetImage 3.4\n"); return pitl->GetImage(); } // if true @@ -483,7 +472,6 @@ namespace creaImageIO while (true); // */ - printf("EED MultiThreadImageReader::GetImage END\n"); } //===================================================================== diff --git a/src/creaImageIOWxGimmickView.cpp b/src/creaImageIOWxGimmickView.cpp index 63d4f42..ffb6174 100644 --- a/src/creaImageIOWxGimmickView.cpp +++ b/src/creaImageIOWxGimmickView.cpp @@ -351,38 +351,25 @@ namespace creaImageIO void WxGimmickView::getSelectedFiles(std::vector &outG, std::vector< std::string> i_attr, bool mult, const std::string out_model) { -printf("EED WxGimmickView::getSelectedFiles Start\n"); - // First we select the files std::vector files; -printf("EED WxGimmickView::getSelectedFiles 1.1\n"); std::string db_name = crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())); -printf("EED WxGimmickView::getSelectedFiles 1.2\n"); GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files); -printf("EED WxGimmickView::getSelectedFiles 1.3\n"); std::string asking; std::string dim; -printf("EED WxGimmickView::getSelectedFiles 1.3.1\n"); bool bsingle = isSingle( files.front() ); -printf("EED WxGimmickView::getSelectedFiles 1.3.2\n"); int i_dim_out; -printf("EED WxGimmickView::getSelectedFiles 1.4\n"); mGimmick->GetSetting(SETTINGS_OUTPUT_ASK, asking); -printf("EED WxGimmickView::getSelectedFiles 1.5\n"); mGimmick->GetSetting(SETTINGS_OUTPUT_DIM, dim); -printf("EED WxGimmickView::getSelectedFiles 1.6\n"); - if (asking == "true") { // display the output dialog box // get dim int idim; sscanf(dim.c_str(),"%d",&idim); -printf("EED WxGimmickView::getSelectedFiles 1.7\n"); WxOutputDlg *dlg = new WxOutputDlg(this,files, idim -1, bsingle); -printf("EED WxGimmickView::getSelectedFiles 1.8\n"); if (dlg->ShowModal() == wxID_OK) { dim = dlg->getDim(); @@ -395,9 +382,6 @@ printf("EED WxGimmickView::getSelectedFiles 1.8\n"); } sscanf(dim.c_str(),"%d",&i_dim_out); -printf("EED WxGimmickView::getSelectedFiles 2\n"); - - // Next we create the structure for dicom output infos OutputAttr Oattr; //EED 01/09/2014 @@ -442,8 +426,6 @@ printf("EED WxGimmickView::getSelectedFiles 2\n"); // Now we read and create the waiting output (vtkImageData * or OutGimmickData *) readImages(outG, sort_files, Oattr, i_dim_out, zspacing); -printf("EED WxGimmickView::getSelectedFiles End\n"); - } diff --git a/src/creaImageIOWxSimpleDlg.cpp b/src/creaImageIOWxSimpleDlg.cpp index 9ae6791..3f44bcd 100644 --- a/src/creaImageIOWxSimpleDlg.cpp +++ b/src/creaImageIOWxSimpleDlg.cpp @@ -152,9 +152,7 @@ namespace creaImageIO { dlg.stopReading(); std::vector outStrGimmick; -printf("EED WxSimpleDlg::OnReadGimmick 1 \n"); dlg.getSelected(outStrGimmick, m_attrDicomTags,true,""); -printf("EED WxSimpleDlg::OnReadGimmick 2 \n"); m_results.clear(); int size=(int)outStrGimmick.size(); int ii; -- 2.47.1