-#if VTK_MAJOR_VERSION >= 6
-//mSlicingTransform->Print(cout);
-//GetImage()->GetTransform()[0]->Print(cout);
-//mSlicingTransform = GetImage()->GetTransform()[0];
-//mImageReslice->SetResliceTransform(mSlicingTransform);
-//mImageReslice->AutoCropOutputOff();
-//mImageReslice->Update();
-int* extentTest = mImageReslice->GetOutput()->GetExtent();
-cout<< extentTest[0] << " " << extentTest[1] << " " << extentTest[2] << " " << extentTest[3] << " " << extentTest[4] << " " << extentTest[5] << endl;
-//this->GetInput()->Print(cout);
-//GetImageActor()->GetMapper()->Print(cout);
- 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);
- } else {
- int w_croppingRegion[6];
- if (mUseReducedExtent) {
- copyExtent(extentTest, w_croppingRegion);
- } else {
- copyExtent(extentTest, w_croppingRegion);
- }
- cout << "w_ext : " << w_ext[0] << " " << w_ext[1] << " " << w_ext[2] << " " << w_ext[3] << " " << w_ext[4] << " " << w_ext[5] << endl;
- w_croppingRegion[ this->SliceOrientation*2 ] = this->Slice;
- w_croppingRegion[ this->SliceOrientation*2+1 ] = this->Slice;
- mapperOpenGL->SetCroppingRegion(w_croppingRegion);
- cout << "w_croppingRegion : " << w_croppingRegion[0] << " " << w_croppingRegion[1] << " " << w_croppingRegion[2] << " " << w_croppingRegion[3] << " " << w_croppingRegion[4] << " " << w_croppingRegion[5] << endl;
- }
-#endif