]> Creatis software - bbtk.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 30 May 2012 17:17:00 +0000 (17:17 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Wed, 30 May 2012 17:17:00 +0000 (17:17 +0000)
kernel/cmake/BBTKVersion.cmake
kernel/src/bbtkFactory.cxx
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreterVirtual.cxx
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/vtk/data/hola.mhd
packages/vtk/data/hola.raw
packages/wxvtk/src/bbwxvtkViewer3D.cxx
packages/wxvtk/src/wxvtkImageViewer2.cxx

index 8aa14b6d5f6fa09692709e49b86e0fb6cfb5520f..da59a828ab5f53fadcaff4536a0b30cf515c0c27 100644 (file)
@@ -3,7 +3,7 @@
 SET(BBTK_VERSION_DATE "19/03/2010")
 SET(BBTK_MAJOR_VERSION 0)
 SET(BBTK_MINOR_VERSION 9)
-SET(BBTK_BUILD_VERSION 5)
+SET(BBTK_BUILD_VERSION 6)
 SET(BBTK_VERSION 
   "${BBTK_MAJOR_VERSION}.${BBTK_MINOR_VERSION}.${BBTK_BUILD_VERSION}")
 # Now in bbtkConfigure.h file (cf. core/src)
index cfd3c6ec531894a0a3dcda4aeab7b906be244ce8..3d4aef1d4d45ca196f30c85f81bcad68c16bd6d4 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/12 14:59:29 $
-  Version:   $Revision: 1.51 $
+  Date:      $Date: 2012/05/30 17:17:00 $
+  Version:   $Revision: 1.52 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -115,6 +115,7 @@ namespace bbtk
        bbtkMessage("output",2,p->GetDescription()<<std::endl);
        //===================================================================
        p->AddFactory(GetThisPointer<Factory>());
+printf("EED Factory::DoLoadPackage > %s %s  %s \n",libname.c_str(), pkgname.c_str(),path.c_str());               
        mPackageMap[pkgname] = p;
        return true;
       }
@@ -140,6 +141,8 @@ namespace bbtk
   
   void Factory::LoadPackage( const std::string& name )
   {
+         
+         
   // Note : in the following :
   // name : the user supplied name
   //      - abreviated name    e.g.       pkg   pkg.so   libbpkg   libbbpkg.so
@@ -149,6 +152,8 @@ namespace bbtk
   //
   // lastname : string before the last / (if any), or user supplied name
          
+        
+         
        if(name != ""){
                bbtkDebugMessageInc("kernel",7,"Factory::LoadPackage(\""<<name<<"\")"<<std::endl);
                bbtkMessage("debug",1,"Factory::LoadPackage(\""<<name<<"\")"<<std::endl);
@@ -158,13 +163,26 @@ namespace bbtk
                std::string pkgname;  // e.g. libbb<pkgname>.so
 
                std::string upath;
+
+               
                pkgname = Utilities::ExtractPackageName(name,upath);
+               
+               printf("EED Factory::LoadPackage A. %s\n", name.c_str());
+               printf("EED Factory::LoadPackage A. %s\n", upath.c_str());
+               printf("EED Factory::LoadPackage A. %s\n", pkgname.c_str());
+               
                bbtkMessage("debug",1,"Package name ["<<pkgname<<"]"<<std::endl);
                bbtkMessage("debug",1,"Package path ["<<upath<<"]"<<std::endl);
 
                // no loading package if already loaded
                PackageMapType::iterator iUnload;
                iUnload = mPackageMap.find(pkgname);
+               
+               PackageMapType::iterator it;
+std::cout << "EED Factory::LoadPackage PackageMap ";
+               for ( it=mPackageMap.begin() ; it != mPackageMap.end(); it++ )
+                       std::cout << (*it).first << " ";
+               std::cout << std::endl;
 
                if (iUnload != mPackageMap.end())
                {
@@ -179,7 +197,8 @@ namespace bbtk
        // *all* the cases. JP
        //==================================================
 
-       //std::cout << "upath [" << upath << "]" << std::endl;
+               printf("\nEED Factory::LoadPackage B. %s\n\n", name.c_str());
+       //std::cout << "upath [" << name << "]" << std::endl;
 
                bool ok = false;
                bool foundFile = false;
@@ -499,6 +518,9 @@ namespace bbtk
                         p->GetName()<<"\")"<<std::endl);
 
     p->AddFactory(GetThisPointer<Factory>());
+         
+printf("EED Factory::InsertPackage %s\n", p->GetName().c_str() );        
+         
     mPackageMap[p->GetName()] = p;
 
     bbtkDebugDecTab("kernel",9);
index 749d11a873a95ed489e14f851d4e618cb96b8ea6..99a751447ae18c3cf0be902e357fd4a7dab8c8a3 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/09/18 22:31:40 $
-  Version:   $Revision: 1.91 $
+  Date:      $Date: 2012/05/30 17:17:00 $
+  Version:   $Revision: 1.92 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -498,6 +498,7 @@ namespace bbtk
        
        void Interpreter::commandLoad(const std::string &packageName) //virtual
     {
+               printf("EED Interpreter::commandLoad %s\n", packageName.c_str());
                GetExecuter()->LoadPackage(packageName);
     }
 
index 49d951f6c90164be8b59e3e4b091c1cdde3fa271..e3ce34b0450383baa9e671cdb6db17e4c7f563a8 100644 (file)
@@ -1332,6 +1332,7 @@ namespace bbtk
                 i++)
              {
                std::string full_path(*i);
+printf("EED InterpreterVirtual::SwitchToFile 1. >>%s\n", full_path.c_str() );
                // we *really* want '.' to be the current working directory
                if (full_path == ".") 
                  {
@@ -1362,6 +1363,9 @@ namespace bbtk
        std::vector<std::string>::iterator i;
        for (i=script_paths.begin();i!=script_paths.end();i++)
          {
+
+printf("EED InterpreterVirtual::SwitchToFile jaja >>  %s\n", (*i).c_str() );
+                 
            bbtkMessage("interpreter",1,
                        "--> Looking in '" << *i << "'" << std::endl);
            
@@ -1372,6 +1376,9 @@ namespace bbtk
            for (std::vector<std::string>::iterator j = Filenames.begin(); 
                 j!= Filenames.end(); ++j)
              {
+                         
+printf("EED InterpreterVirtual::SwitchToFile kkkkk     >>  %s\n", (*j).c_str() );
+                         
                int lgr = (*j).size();
                if (lgr < 5) continue;  
                // ignore non .bbp file
@@ -1466,6 +1473,7 @@ namespace bbtk
                }
          
                std::string tfullPathScriptName = Utilities::MakePkgnameFromPath(path, name, false);
+                 
 //Addition JCP tfullPathScriptName.size()>=4 
                if(tfullPathScriptName.size()>=4){
                        if (tfullPathScriptName.substr(tfullPathScriptName.size()-4, 3)==".bb")
@@ -1526,6 +1534,7 @@ namespace bbtk
           bbtkError("No ["<<pkgname<<".bbs/.bbp] script found");
        return;
       } else {
+//EED printf("EED D. SwitchToFile %s\n", fullPathScriptName.c_str() );   
                LoadScript(fullPathScriptName,name);
 //EED Borrame    if (source) GetExecuter()->SetCurrentFileName(fullPathScriptName);
                if (source) SetCurrentFileName(fullPathScriptName);
index 5e927d075c4ac797505a16f5c0ba35ead05cc871..1ec74e201efc89186624198ffc0e69459bdd3cb2 100644 (file)
@@ -90,6 +90,11 @@ void GetXCoherentInfoGdcmReader::Process()
       reader=NULL;
    }
    reader = vtkGdcmReader::New();
+       
+       //EED 21 mars 2012  FLIP probleme  ..PLOP..
+       reader->SetFlipY(false);
+
+       
    //reader->SetFileName( bbGetInputIn().c_str() );
    reader->SetCoherentFileList(l);
    reader->Update();
index e6248269291824ab172b9112a8e84e330b9f1666..db3c23dbbe1e54437a982ab72125e6f649eec3df 100644 (file)
@@ -1,18 +1,18 @@
 ObjectType = Image
 NDims = 3
+BinaryData = True
+BinaryDataByteOrderMSB = False
+CompressedData = False
+TransformMatrix = 1 0 0 0 1 0 0 0 1
+CenterOfRotation = 0 0 0
+ElementSpacing = 0.7 0.7 0.7
 DimSize = 127 147 187
+AnatomicalOrientation = ???
 ElementType = MET_USHORT
-HeaderSize = 0
 ElementNumberOfChannels = 1
 
-ElementSpacing = 0.7 0.7 0.7
-Position = 0 0 0
-TransformMatrix = 1 0 0 0 1 0 0 0 1
 Offset = 0 0 0
-CenterOfRotation = 0 0 0
+HeaderSize = 0
 
-BinaryData = True
-BinaryDataByteOrderMSB = False
-CompressedData = False
 
 ElementDataFile = hola.raw
index 9945f10119178192a1930a5a53c40003b63abc0f..77b3ddfc525888b0ca4cab7d9ec18ee8db3495d8 100644 (file)
Binary files a/packages/vtk/data/hola.raw and b/packages/vtk/data/hola.raw differ
index 8ef685a6b811615353f30c5729318ae49bf88c54..7345f82040f181afdf2c95222acbfcdd96e2f0fb 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxvtkViewer3D.cxx,v $
   Language:  C++
-  Date:      $Date: 2011/05/05 16:07:19 $
-  Version:   $Revision: 1.21 $
+  Date:      $Date: 2012/05/30 17:17:02 $
+  Version:   $Revision: 1.22 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -80,6 +80,8 @@ namespace bbwxvtk
    camera->SetViewUp ( spx*0, -spy*1, spz*0);
    camera->SetPosition( spx*(x1+x2)/2, spy*(y1+y2)/2, -spz*10000000); 
    camera->SetFocalPoint       ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0); 
+         
+         
    //          camera->SetParallelScale(  spx*(x2-x1)/2.0 );
    renderer->ResetCamera(x1,x2,y1,y2,z1,z2);
    
index 2fac472306cf414cbc8456f05246aa48ee5aa802..45ab995f3b55af353ac565e89b45bf1de3836cd6 100644 (file)
@@ -26,7 +26,7 @@
 #include "vtkRenderWindowInteractor.h"
 #include "vtkRenderer.h"
 
-vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.5 $");
+vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.6 $");
 vtkStandardNewMacro(wxvtkImageViewer2);
 
 //----------------------------------------------------------------------------
@@ -310,26 +310,54 @@ void wxvtkImageViewer2::UpdateOrientation()
   vtkCamera *cam = this->Renderer ? this->Renderer->GetActiveCamera() : NULL;
   if (cam)
     {
+
+// EED 21 mars FLIP problem  ..PLOP..          
     switch (this->SliceOrientation)
-      {
-      case wxvtkImageViewer2::SLICE_ORIENTATION_XY:
-        cam->SetFocalPoint(0,0,0);
-        cam->SetPosition(0,0,1); // -1 if medical ?
-        cam->SetViewUp(0,1,0);
-        break;
-
-      case wxvtkImageViewer2::SLICE_ORIENTATION_XZ:
-        cam->SetFocalPoint(0,0,0);
-        cam->SetPosition(0,-1,0); // 1 if medical ?
-        cam->SetViewUp(0,0,1);
-        break;
-
-      case wxvtkImageViewer2::SLICE_ORIENTATION_YZ:
-        cam->SetFocalPoint(0,0,0);
-        cam->SetPosition(1,0,0); // -1 if medical ?
-        cam->SetViewUp(0,0,1);
-        break;
+       {
+               case wxvtkImageViewer2::SLICE_ORIENTATION_YZ:
+                         cam->SetViewUp(0,0,-1);
+                         cam->SetPosition(-1,0,0); // -1 if medical ?
+                         cam->SetFocalPoint(0,0,0);
+                       break;
+                       
+               case wxvtkImageViewer2::SLICE_ORIENTATION_XZ:
+                       cam->SetViewUp(0,0,1);
+                       cam->SetPosition(0,-1,0); // 1 if medical ?
+                       cam->SetFocalPoint(0,0,0);
+                       break;
+                       
+               case wxvtkImageViewer2::SLICE_ORIENTATION_XY:
+                         cam->SetViewUp(0,-1,0);
+                         cam->SetPosition(0,0,-1); 
+                         cam->SetFocalPoint(0,0,0);
+                       break;
       }
+       
+/*             
+               switch (this->SliceOrientation)
+               {
+                       case wxvtkImageViewer2::SLICE_ORIENTATION_YZ:
+                               cam->SetViewUp(0,0,1);
+                               cam->SetPosition(1,0,0); // -1 if medical ?
+                               cam->SetFocalPoint(0,0,0);
+                               break;
+                       case wxvtkImageViewer2::SLICE_ORIENTATION_XZ:
+                               cam->SetViewUp(0,0,1);
+                               cam->SetPosition(0,-1,0); // 1 if medical ?
+                               cam->SetFocalPoint(0,0,0);
+                               break;
+                       case wxvtkImageViewer2::SLICE_ORIENTATION_XY:
+                               cam->SetViewUp(0,1,0);
+                               cam->SetPosition(0,0,1); // -1 if medical ?
+                               cam->SetFocalPoint(0,0,0);
+                               break;
+                               
+               }               
+*/             
+               
     }
 }