X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOGimmickView.cpp;h=6df7fc0132413e211c5a4c9d9b326a009654dba2;hb=cb539b100d38f3092d06430575f846c916235db4;hp=d990cb56b942e509197655e39841dd74c612c30a;hpb=b0843014c5482f70050fab8036c6780172e3b6c9;p=creaImageIO.git diff --git a/src2/creaImageIOGimmickView.cpp b/src2/creaImageIOGimmickView.cpp index d990cb5..6df7fc0 100644 --- a/src2/creaImageIOGimmickView.cpp +++ b/src2/creaImageIOGimmickView.cpp @@ -5,7 +5,6 @@ #include #include namespace fs = boost::filesystem; - namespace creaImageIO { @@ -285,7 +284,7 @@ namespace creaImageIO ///Reads Images (Non Threaded) void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vector im, int dimension) { - + mReader.Stop(); /* remember! #define GIMMICK_NO_IMAGE_SELECTION 0 @@ -301,7 +300,9 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect // Create the output data if (im.size()==1) { - // O0. + vtkImageData * out=vtkImageData::New(); + out->ShallowCopy(mReader.GetImage(im.front())); + s.push_back(out); } else if (im.size()>1) // Test inutile ? JPR { @@ -321,7 +322,7 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect { // n*2D to 3D vtkImageData* out = vtkImageData::New(); - out->CopyStructure(first); +// out->CopyStructure(first); out->SetScalarType(first->GetScalarType()); out->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents()); int ext[6]; @@ -360,7 +361,7 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect // Order the file name vector double spc[3]; - out->GetSpacing(spc); + first->GetSpacing(spc); spc[2]=OrderTheFileNameVector(im); out->SetSpacing(spc); int slice = 0;