X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaImageIOGimmickView.cpp;h=0281042c2c1e5e62502f8c8972c3cfb9d22f1348;hb=f4345fcbbb606af15d5af72b6179d5103ff75565;hp=0a76936736294655e38f4d77fa54c0a5790b89f9;hpb=bae8afe7ee037a3368be7060c3a0708582e7d413;p=creaImageIO.git diff --git a/src/creaImageIOGimmickView.cpp b/src/creaImageIOGimmickView.cpp index 0a76936..0281042 100644 --- a/src/creaImageIOGimmickView.cpp +++ b/src/creaImageIOGimmickView.cpp @@ -486,20 +486,37 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect void GimmickView::readImages1(std::vector& o_output, std::vector im, OutputAttr i_attr) { + + i_attr.outside.push_back("D0019_100a"); // simens Number Of Images In Mosaic + +//EED Borrame + int i,isize=i_attr.outside.size(); + for (i=0;i::iterator it; for (it=im.begin(); it!=im.end(); ++it) { OutStrGimmick out; out.img = vtkImageData::New(); out.img->ShallowCopy(mReader.GetImage(*it)); - if(i_attr.mult) +printf("EED GimmickView::readImages1 A\n "); + if(i_attr.mult) + { getAttributes((*it),out.infos,i_attr); +printf("EED GimmickView::readImages1 B %s \n ", out.infos.find("D0019_100a")->second.c_str() ); + } o_output.push_back(out); } // If we want only one output information structure, we set it outside the loop if(!i_attr.mult) { getAttributes(im.front(), o_output.front().infos, i_attr); +printf("EED GimmickView::readImages1 C %s \n ", o_output.front().infos.find("D0019_100a")->second.c_str() ); } } @@ -520,9 +537,7 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect if(ext[5] == 0) { ext[5] = (int)im.size()-1; - } - else - { + } else { ext[5] = ext[5] * (int)im.size()-1; // to deal with multiframes } out.img->SetExtent(ext); @@ -665,19 +680,15 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect if ( size == 0) { return; - } - else if (size == 1) - { + } else if (size == 1) { // Simplest case // Only one image : give it // But take in count multiframe possibility if ( isSingle(im.front()) || i_dim != 1) { readImages1(o_output,im, i_attr); - } - else - { - readImages2(o_output,im, i_attr,i_zspc); + } else { + readImages2(o_output,im, i_attr,i_zspc); } } else { // multiple or single frame @@ -688,40 +699,33 @@ void GimmickView::ReadImagesNotThreaded(std::vector& s, std::vect { // 2D to 3D readImages3(o_output,im, i_attr,i_zspc); - } - else - { + } else { readImages1(o_output,im, i_attr); } - } - else - { + } else { // we deal with multiple frames n x (2D x T) // Differents outputs are avaialable if(i_dim == 1) { // put all in one output readImages3(o_output,im, i_attr,i_zspc); - - } - else if( i_dim == 2) - { + } else if( i_dim == 2) { // put in a vector of n x T (2D) readImages2(o_output,im, i_attr,i_zspc); - } - else if( i_dim == 3) - { + } else if( i_dim == 3) { // put in a vector of n (2D x T) // No transformations. readImages1(o_output,im, i_attr); - } - else - { + } else { // put in a vector of T (2D x n) readImages4(o_output,im, i_attr); - } - } - } + } // i_dim + } //isSingle(im.front()) + } // if size + +//EED UnMosaic step... +//How to verifie if is a mosaic file , with how many images inside?? + }