]> Creatis software - bbtk.git/blobdiff - packages/itk/src/bbitkImageProperties.cxx
Last fixes (until next one)
[bbtk.git] / packages / itk / src / bbitkImageProperties.cxx
index 3202074afd8f70bd908e51762f1d1050af30feda..a10ed0fb2a91b56ee4a47cd72815b538f0353b55 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbitkImageProperties.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/05 12:03:01 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/07/23 12:02:15 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include "bbitkImageProperties.h"
 #include "bbitkPackage.h"
 
+
+
 namespace bbitk 
 {
-  BBTK_USER_BLACK_BOX_IMPLEMENTATION(ImageProperties,bbtk::UserBlackBox);
+  BBTK_BLACK_BOX_IMPLEMENTATION(ImageProperties,bbtk::AtomicBlackBox);
 
   BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageProperties);
 
@@ -50,7 +52,8 @@ namespace bbitk
                        <<bbtk::TypeName<itkImageType>()
                        <<">()"<<std::endl);
 
-    itkImageType* im = bbGetInputIn().get<itkImageType*>();
+
+       itkImageType* im = bbGetInputIn().get<itkImageType*>();
     unsigned int dim = im->GetImageDimension();
 
     bbSetOutputTypeName(bbtk::TypeName<typename itkImageType::PixelType>());
@@ -60,17 +63,17 @@ namespace bbitk
 
     const typename itkImageType::IndexType& ind = r.GetIndex();
     std::vector<int> vind;
-    for (int i=0;i<dim;++i) vind.push_back(ind[i]);
+    for (unsigned int i=0;i<dim;++i) vind.push_back(ind[i]);
     bbSetOutputIndex(vind);
 
     const typename itkImageType::SizeType& sz = r.GetSize();
     std::vector<int> vsz;
-    for (int i=0;i<dim;++i) vsz.push_back(sz[i]);
+    for (unsigned int i=0;i<dim;++i) vsz.push_back(sz[i]);
     bbSetOutputSize(vsz);
 
     typename itkImageType::SpacingType sp = im->GetSpacing();
     std::vector<float> vsp;
-    for (int i=0;i<dim;++i) vsp.push_back(sp[i]);
+    for (unsigned int i=0;i<dim;++i) vsp.push_back(sp[i]);
     bbSetOutputSpacing(vsp);
 
     bbtkDebugDecTab("Core",9);