[Vv] Reg: vvimage reading one slice 3D

Dr. Kumar Rajamani k_rajamani at cb.amrita.edu
Thu Oct 21 21:21:41 CEST 2010


Hi Simon 
I had a test image of a 3D stack with one image x*y*1

This was reading inside VV as 2D image in first place

Then other operations such as overlay was not possible

I think the error is due to the following function below

If I made the line if (mVtkImages.size() >= 1)
Then it works 

Warm Regards
Kumar


int vvImage::GetNumberOfDimensions() const
{
  if (mVtkImages.size()) {
    int dimension = 2;
    int extent[6];
    mVtkImages[0]->GetWholeExtent(extent);
    if (extent[5] - extent[4] >= 1)
      dimension++;
    if (mVtkImages.size() >= 1)
      dimension++;
    return dimension;
  }
  return 0;
}




More information about the vv mailing list