]> Creatis software - creaImageIO.git/commitdiff
#3185 creaImageIO Feature New Normal - Clean code master
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 3 May 2018 09:57:08 +0000 (11:57 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 3 May 2018 09:57:08 +0000 (11:57 +0200)
bbtk/src/bbcreaImageIOGimmick.xml
src/creaImageIOGimmickView.cpp
src/creaImageIOWxGimmickReaderDialog.cpp
src/creaImageIOWxGimmickView.cpp
src/creaImageIOWxSimpleDlg.cpp

index 248a86840199d9e1d35906345202beb526640748..d07a54fd2fc7ece26831afa24978bafc054d210e 100644 (file)
            bbSetOutputOut(m_results[0]);
            bbSetOutputOut2(m_results);
          }
-       std::vector<std::string> files;
-       w.GetSelectedFiles(files);
-       bbSetOutputFiles(files);
-
-
-       bbSetOutputDicomInfo( m_resultsDicomAtr );
-
-
-
-                       w.OnExit();
+       std::vector<std::string> files;
+               w.GetSelectedFiles(files);
+               bbSetOutputFiles(files);
+               bbSetOutputDicomInfo( m_resultsDicomAtr );
+               w.OnExit();
                 }
 
 
index 4ada3a9c54277a33230e0bee464de9bc514f3f3f..672f9224b9874b4a8297f9904bb023f2fd331ad9 100644 (file)
@@ -489,26 +489,15 @@ void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s, std::vect
 
                i_attr.outside.push_back("D0019_100a");  // simens Number Of Images In Mosaic
 
-//EED Borrame
-               int i,isize=i_attr.outside.size();
-               for (i=0;i<isize;i++)
-               {
-               printf("EED GimmickView::readImages1 A  i_attr out %s \n", i_attr.outside[i].c_str());
-               }
-
-
-
                std::vector<std::string>::iterator it;
                for (it=im.begin(); it!=im.end(); ++it)
                {
                        OutStrGimmick out;
                        out.img = vtkImageData::New();
                        out.img->ShallowCopy(mReader.GetImage(*it));
-printf("EED GimmickView::readImages1 A\n ");
                        if(i_attr.mult) 
                        {
                                getAttributes((*it),out.infos,i_attr);
-printf("EED GimmickView::readImages1 B   %s \n ", out.infos.find("D0019_100a")->second.c_str() );                              
                        }
                        o_output.push_back(out);
                }
@@ -516,7 +505,6 @@ printf("EED GimmickView::readImages1 B   %s \n ", out.infos.find("D0019_100a")->
                if(!i_attr.mult)
                {
                        getAttributes(im.front(), o_output.front().infos, i_attr);
-printf("EED GimmickView::readImages1 C   %s \n ", o_output.front().infos.find("D0019_100a")->second.c_str() );
                }
                
        }
index bce7fc7f4ca08de141d1f1d87bd33b49d4e551e9..771bb052998e90da9d38add2825764590a4badfd 100644 (file)
@@ -67,10 +67,10 @@ namespace creaImageIO
 
     try {
 
-         mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
-      mGimmick->Initialize(i_namedescp,i_namedb);
+       mGimmick = boost::shared_ptr<Gimmick>(new Gimmick());
+       mGimmick->Initialize(i_namedescp,i_namedb);
 
-      mView = new WxGimmickView(mGimmick,
+       mView = new WxGimmickView(mGimmick,
                                this,
                                TVID,
                                wxDefaultPosition,
@@ -78,9 +78,9 @@ namespace creaImageIO
                                min_dim,
                                max_dim,
                                threads);
-      mView->Initialize();
+       mView->Initialize();
           // Connect the AddProgress callback
-      mView->ConnectValidationObserver
+       mView->ConnectValidationObserver
                ( boost::bind( &WxGimmickReaderDialog::OnValid , this, _1 ) );
     }
     catch (crea::Exception e)
@@ -88,20 +88,15 @@ namespace creaImageIO
       e.Print();
       return;
     }
-
     mtopsizer->Add( mView,1,wxGROW,0);
-
     wxSizer* bsizer = this->CreateSeparatedButtonSizer(wxOK|wxCANCEL);
        /*mOkButton = new wxButton(this, wxID_OK, _T("OK"), wxPoint(170,50));
        mCancelButton = new wxButton(this, wxID_CANCEL, _T("CANCEL"), wxPoint(210,50));
        */      mOkButton = (wxButton*)FindWindowById(GetAffirmativeId(), this);
     mCancelButton = (wxButton*)FindWindowById(GetEscapeId(),      this);
-
     mOkButton->Enable(false);
     mtopsizer->Add ( bsizer, 0, wxGROW );
-
-    SetSizer( mtopsizer );     
+    SetSizer( mtopsizer );
     Layout(); 
   }
 
@@ -118,7 +113,6 @@ namespace creaImageIO
       {
                mGimmick->Finalize();
       }
-
   }
 
   ///Callback method on a selection
index 0ee66e527742783db26a6974ce6f4980a4252c02..ef9ee5c956af0a4a31b86f6e2c2a28850e56caff 100644 (file)
@@ -204,8 +204,8 @@ namespace creaImageIO
     /// \TODO fix warning: unused variable hsize
     int hsize = size.GetHeight();
 
-    int top_minsize = 450;
-    int bottom_minsize = 50;
+    int top_minsize    = 450;
+    int bottom_minsize         = 50;
 
     mSplitter->SetMinimumPaneSize( bottom_minsize );
     mSplitter->SplitHorizontally( mNotebook, mBottomPanel, 
@@ -1175,9 +1175,9 @@ namespace creaImageIO
   //========================================================================
   void WxGimmickView::CreateEditFieldsDialog(tree::Node* node, std::vector<std::string> names, std::vector<std::string> keys)
   {
-    wxDialogdial= new wxDialog (this,-1,crea::std2wx("Edit Fields for node "+node->GetLabel()),wxDefaultPosition, wxSize(350,155));
-    wxBoxSizer *siz = new wxBoxSizer(wxVERTICAL);
-    WxEditFieldsPanel* ef = new WxEditFieldsPanel(dial, dial, this, node, names, keys);
+    wxDialog           *dial= new wxDialog (this,-1,crea::std2wx("Edit Fields for node "+node->GetLabel()),wxDefaultPosition, wxSize(350,155));
+    wxBoxSizer         *siz = new wxBoxSizer(wxVERTICAL);
+    WxEditFieldsPanel  *ef  = new WxEditFieldsPanel(dial, dial, this, node, names, keys);
 
     siz->Add( ef,1,wxGROW  ,0); 
     dial->SetSizer(siz);
index f11574cd070b50e066190ae7ef32f2b8b3bdf989..1c076b0d4a0d0bc4fd733543fd22f1e8f6ea3a3a 100644 (file)
@@ -145,11 +145,9 @@ namespace creaImageIO
                 dlg.ShowModal();
                 if (dlg.GetReturnCode() == wxID_OK)
             {
-                               dlg.stopReading();
-
-                               std::vector<creaImageIO::OutStrGimmick> outStrGimmick;
-                               dlg.getSelected(outStrGimmick, m_attrDicomTags,true,"");
-
+                       dlg.stopReading();
+                       std::vector<creaImageIO::OutStrGimmick> outStrGimmick;
+                       dlg.getSelected(outStrGimmick, m_attrDicomTags,true,"");
                        m_results.clear();
                        int size=(int)outStrGimmick.size();
                        int ii;
@@ -171,7 +169,6 @@ namespace creaImageIO
 
                        infoimage               =       _T("EED Missing info <void> ???");
                        infoimageSource =       _T("GIMMICK");
-
                        dlg.OnExit();
                 }
                 SetReturnCode( dlg.GetReturnCode() );