#if VTK_MAJOR_VERSION <= 5
this->ImageActor->SetDisplayExtent(w_ext);
#else
+ cout << mReducedExtent[0] << " " << mReducedExtent[1] << " " << mReducedExtent[2] << " " << mReducedExtent[3] << " " << mReducedExtent[4] << " " << mReducedExtent[5] << endl;
vtkSmartPointer<vtkOpenGLImageSliceMapper> mapperOpenGL= vtkSmartPointer<vtkOpenGLImageSliceMapper>::New();
try {
mapperOpenGL = dynamic_cast<vtkOpenGLImageSliceMapper*>(GetImageActor()->GetMapper());
}
// Set initial sliders values
- std::vector<int> imsize = mCurrentSlicerManager->GetImage()->GetSize();
+ int w_ext[6], imsize[3];
+ mCurrentSlicerManager->GetSlicer(0)->GetRegisterExtent(w_ext);
for(int dim=0; dim<slicer->GetDimension() && dim<3; ++dim){
+ imsize[dim] = w_ext[2*dim+1] - w_ext[2*dim] +1;
mSliders[dim*2]->setMaximum(imsize[dim]-1);
mSliders[dim*2+1]->setMaximum(imsize[dim]-1);
mSliders[dim*2+1]->setValue(imsize[dim]-1);