}
out.img->SetExtent(ext);
int dim[3];
+ double spac[3];
first->GetDimensions(dim);
+ first->GetSpacing(spac);
+ out.img->SetSpacing(spac);
out.img->SetDimensions(dim[0], dim[1], im.size() );
out.img->AllocateScalars();
out.img->Update();
{
vtkImageData* first = mReader.GetImage( im.front());
int dim[3];
+ double spac[3];
first->GetDimensions(dim);
+ first->GetSpacing(spac);
// differents formats char , short, etc...
// differents components 1..3 ex. jpg ->RGB 3
unsigned long imsize = dim[0] * dim[1];
OutStrGimmick out;
out.img = vtkImageData::New();
out.img->SetScalarType(first->GetScalarType());
-
+ out.img->SetSpacing(spac);
out.img->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
int ext[6];
first->GetWholeExtent(ext); // send also 0,0 in Z
out.img->SetNumberOfScalarComponents(first->GetNumberOfScalarComponents());
int ext[6];
+ double spac[6];
first->GetWholeExtent(ext); // send also 0,0 in Z
ext[5] = 0;
out.img->SetExtent(ext);
-
+ first->GetSpacing(spac);
+ out.img->SetSpacing(spac);
out.img->SetDimensions(dim[0], dim[1], im.size() );
out.img->AllocateScalars();
out.img->Update();