+ std::map <std::string , std::string> mapAttr;
+ mReader->getAttributes( (*it).c_str() , mapAttr, i_attr ); // filename, outMapAttr-NameValue, inVectAttributeName
+ i_imgAttr.push_back( mapAttr );
+
+//EED borrame
+// i_img.push_back( mReader->ReadImage( (*it).c_str() ) );
+
+
+ // EED 18 octt 2014
+ std::map <std::string , std::string>::iterator itMapAttr;
+ std::string numberOfImagesInMosaicStr="";
+ std::string spaceBetweenSliceStr="";
+
+ itMapAttr = mapAttr.find("D0019_100a");
+ if ( itMapAttr!=mapAttr.end() ) numberOfImagesInMosaicStr = itMapAttr->second;
+
+// std::string numberOfImagesInMosaicStr = mapAttr.find("D0019_100a")->second;
+ itMapAttr = mapAttr.find("D0018_0088");
+ if ( itMapAttr!=mapAttr.end() ) spaceBetweenSliceStr = itMapAttr->second;
+
+// std::string spaceBetweenSliceStr = mapAttr.find("D0018_0088")->second;
+ if (numberOfImagesInMosaicStr=="")
+ {
+ i_img.push_back( mReader->ReadImage( (*it).c_str() ) );
+ } else {
+ numberOfImagesInMosaic = atoi(numberOfImagesInMosaicStr.c_str());
+ spcZ = atoi(spaceBetweenSliceStr.c_str());
+ tmpImg1 = mReader->ReadImage( (*it).c_str() ) ;
+ tmpImg1->GetSpacing( spc );
+ tmpImg2 = Mosaic.unMosaic( tmpImg1 , numberOfImagesInMosaic );
+ tmpImg2->SetSpacing( spc[0], spc[1], spcZ );
+ i_img.push_back( tmpImg2 );
+ }// elemet
+
+ } else {
+ printf("ERROR. Impossible to read file %s\n", (*it).c_str() );