]> Creatis software - bbtk.git/commitdiff
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/bbtk
authorEsteban Correa <esteban@maurosc3ner.fedora>
Tue, 16 Apr 2013 13:15:22 +0000 (09:15 -0400)
committerEsteban Correa <esteban@maurosc3ner.fedora>
Tue, 16 Apr 2013 13:15:22 +0000 (09:15 -0400)
Conflicts:
packages/itk/src/bbitkImageProperties.h

1  2 
packages/itk/src/bbitkImageProperties.cxx
packages/itk/src/bbitkImageProperties.h

index 2304ba8d3168087d4e1d40b8529a768a1fefda3a,8004f5c087e3e01f73baa2417314eb9d14094707..7e5f47dbd62272fd195bd9c26da125fb560b9abe
@@@ -104,22 -104,11 +104,22 @@@ namespace bbit
     if (dim==2)
          vsz.push_back(1);
      bbSetOutputSize(vsz);
 +    
 +    const typename itkImageType::PointType& orgn = im->GetOrigin();
 +    std::vector<float> vog;
 +    for (unsigned int i=0;i<dim;++i) 
 +       vog.push_back(orgn[i]);
 +       
 + // brute hack to avoid failure of most black boxes that expects 3D images. // EC
 +    if (dim==2)
 +       vog.push_back(1.0);
 +  
 +    bbSetOutputOrigin(vog);
  
      typename itkImageType::SpacingType sp = im->GetSpacing();
-     std::vector<float> vsp;
+     std::vector<double> vsp;
      for (unsigned int i=0;i<dim;++i) 
-        vsp.push_back(sp[i]);
+        vsp.push_back(double(sp[i]));
         
   // brute hack to avoid failure of most black boxes that expects 3D images. // JPR
      if (dim==2)
index 4149e44b420d51d01b7fb55544fbe6601720f0ce,5782da9dd03d3f8b35f2ebb8b7969bbf253d1818..f1bf25bfd2296df8ba241d150500b7f9c2129aac
@@@ -69,8 -69,7 +69,9 @@@ namespace bbit
      BBTK_DECLARE_OUTPUT(LargestPossibleRegion,anyImageRegion);
      BBTK_DECLARE_OUTPUT(Index,std::vector<int>);
      BBTK_DECLARE_OUTPUT(Size,std::vector<int>);
-     BBTK_DECLARE_OUTPUT(Spacing,std::vector<float>);
 +    BBTK_DECLARE_OUTPUT(Origin,std::vector<float>);
+     BBTK_DECLARE_OUTPUT(Spacing,std::vector<double>);
++
        BBTK_DECLARE_OUTPUT(MinMax,std::vector<float>);
      BBTK_PROCESS(DoIt);
      void DoIt();
    BBTK_OUTPUT(ImageProperties,TypeName,"Pixel type name",std::string,"pixel type");
    BBTK_OUTPUT(ImageProperties,Dimension,"Dimension",unsigned int,"image dimension");
    BBTK_OUTPUT(ImageProperties,LargestPossibleRegion,"Global extent of the image",anyImageRegion,"");
 -  BBTK_OUTPUT(ImageProperties,Index,"Origin of the image",std::vector<int>,"image index");
 +  BBTK_OUTPUT(ImageProperties,Index,"Index of the image",std::vector<int>,"image index");
    BBTK_OUTPUT(ImageProperties,Size,"Size in each dimension",std::vector<int>,"image size");
-   BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<float>,"voxel size");
 +  BBTK_OUTPUT(ImageProperties,Origin,"Origin of the image",std::vector<float>,"image origin");
+   BBTK_OUTPUT(ImageProperties,Spacing,"Size of the voxels",std::vector<double>,"voxel size");
    BBTK_OUTPUT(ImageProperties,MinMax,"Minimum and the maximum intensity values of an image",std::vector<float>,"");
    BBTK_END_DESCRIBE_BLACK_BOX(ImageProperties);
    //=================================================================