-#else
- vtkSmartPointer<vtkOpenGLImageSliceMapper> mapperOpenGL= vtkSmartPointer<vtkOpenGLImageSliceMapper>::New();
- try {
- mapperOpenGL = dynamic_cast<vtkOpenGLImageSliceMapper*>(GetImageActor()->GetMapper());
- } catch (const std::bad_cast& e) {
- std::cerr << e.what() << std::endl;
- std::cerr << "Conversion error" << std::endl;
- return;
- }
- if (mFirstSetSliceOrientation) {
- copyExtent(ext, mRegisterExtent);
- this->ImageActor->SetDisplayExtent(w_ext); //initialisation
- } else {
- int w_croppingRegion[6];
- copyExtent(mRegisterExtent, w_croppingRegion);
- this->ImageActor->SetDisplayExtent(w_ext);
- w_croppingRegion[ this->SliceOrientation*2 ] = this->Slice;
- w_croppingRegion[ this->SliceOrientation*2+1 ] = this->Slice;
- mapperOpenGL->SetCroppingRegion(w_croppingRegion);
- }
-#endif