]> Creatis software - creaImageIO.git/commitdiff
extent problem.
authorFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Thu, 24 Sep 2009 15:13:44 +0000 (15:13 +0000)
committerFrederic Cervenansky <Frederic.Cervenansky@creatis.insa-lyon.fr>
Thu, 24 Sep 2009 15:13:44 +0000 (15:13 +0000)
src2/creaImageIOGimmickView.cpp

index b0d9041e6c634c07dddcd73a808034aa172b77c3..3e759dd4d5b67382251a843116c95841cf499632 100644 (file)
@@ -310,7 +310,7 @@ void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vecto
                        int ext[6];
                        first->GetExtent(ext);
                        ext[5] = im.size();
-                       out->SetExtent(ext);
+                       out->SetExtent(ext) -1;
                        // LG : TODO : Z Spacing  ?
 
                        out->AllocateScalars();
@@ -320,10 +320,10 @@ void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vecto
 
                        int dim[3];
                        first->GetDimensions(dim);
-                       unsigned long imsize = 
+                       unsigned long imsize = dim[0] * dim[1];/*
                                ( (unsigned long)first->GetScalarPointer(0,1,0)
                        - (unsigned long)first->GetScalarPointer(0,0,0))
-                               *dim[1];
+                               *dim[1];*/
 
                        int slice = 0;
                        std::vector<std::string>::iterator it;
@@ -337,12 +337,13 @@ void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vecto
                        //              std::cout << "src="<<src<<std::endl;
                        //              std::cout << "dst="<<dst<<std::endl;
                        //              std::cout << "siz="<<imsize<<std::endl;
+                       std::cout << slice;
                        memcpy(dst,src,imsize);
 
                        slice++;
-                               }
+                               }       
                        s.push_back(out);
-
+                               
                }
        }       
 }