void GimmickView::readImages1(std::vector<OutStrGimmick>& o_output, std::vector<std::string> 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<isize;i++)
+ {
+ printf("EED GimmickView::readImages1 A i_attr out %s \n", i_attr.outside[i].c_str());
+ }
+
+
+
std::vector<std::string>::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() );
}
}
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);
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
- {
+ } else {
+ readImages2(o_output,im, i_attr,i_zspc);
+ }
+ } else {
// multiple or single frame
if ( isSingle(im.front()) )
{
{
// 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??
+
}