/// Finalize
void GimmickView::Finalize()
{
+ printf("EED GimmickView::Finalize \n");
}
//======================================================================
OutputAttr i_attr, double i_zspc)
{
OutStrGimmick out;
- vtkImageData* first = mReader.GetImage( im.front());
+ vtkImageData* first = mReader.GetImage( im.front() );
out.img = vtkImageData::New();
int ext[6];
//EED 2017-01-01 Migration VTK7
double spac[3];
first->GetDimensions(dim);
first->GetSpacing(spac);
- out.img->SetSpacing(spac);
+
+ //EED 2024-01-24
+ spac[2] = i_zspc;
+
+ out.img->SetSpacing(spac);
out.img->SetDimensions(dim[0], dim[1], (int)im.size() );
out.img->AllocateScalars(first->GetScalarType(), first->GetNumberOfScalarComponents());
#endif
-
unsigned long imsize = dim[0] * dim[1];
imsize = imsize * dim[2] ; // deal with multiframes here
// differents formats char , short, etc...
//!!!!out.img->SetSpacing(i_zspc);
int slice = 0;
std::vector<std::string>::iterator it;
+
for (it=im.begin(); it!=im.end(); ++it)
{
vtkImageData* cur = mReader.GetImage( (*it) );
memcpy(out.img->GetScalarPointer(0,0,slice), cur->GetScalarPointer(0,0,0), imsize);
slice++;
- }
+ } // for it
getAttributes(im.front(),out.infos, i_attr);
o_output.push_back(out);
//EED UnMosaic step...
//How to verifie if is a mosaic file , with how many images inside??
-
}