From: Frederic Cervenansky Date: Mon, 2 Nov 2009 15:50:13 +0000 (+0000) Subject: correction to select only single frame X-Git-Tag: CREATOOLS.2-0-3~105 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6ce1377c642f91e9b173b8a5440543eb5320fcd5;p=creaImageIO.git correction to select only single frame --- diff --git a/src2/creaImageIOGimmickView.cpp b/src2/creaImageIOGimmickView.cpp index b75dcdd..46ab564 100644 --- a/src2/creaImageIOGimmickView.cpp +++ b/src2/creaImageIOGimmickView.cpp @@ -316,8 +316,14 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect out->SetScalarType(first->GetScalarType()); int ext[6]; first->GetExtent(ext); - //ext[5] = im.size()-1; // JPR - ext[5] = ext[5] * im.size()-1; // deal with multiframes //JPR + if(ext[5] == 0) + { + ext[5] = im.size()-1; + } + else + { + ext[5] = ext[5] * im.size()-1; // to deal with multiframes - JPR + } out->SetExtent(ext); // LG : TODO : Z Spacing ? @@ -340,16 +346,11 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect std::vector::iterator it; for (it=im.begin(); it!=im.end(); ++it) { - //std::cout << "copying slice "<GetScalarPointer(0,0,0); - void* dst = out->GetScalarPointer(0,0,slice); - // std::cout << "src="<