problem about the extents of output image in vtkResliceImageViewer when crosshair moving

I have realized the 2D viewers with 2D vtkResliceImageViewer and a 3D MPR viewer with vtkImagePlaneWidget in my demo. Now the MPR plane can update its cursor position with the 2D viewer crosshair moving. When 2D cursor moving, the reslice image I get has its new extents(bounds), which is larger than the extents(bounds) of the original image data (I draw yellow frame in the picture). The blank area is unnecessary for me. I want to get the same extent as the image data when moving the crosshair in the 2D viewer. What should I do?

This is part of my code in the callback function of ResliceAxesChangedEvent. First to get the origin, point1 and point2. Then to update the position of the MPR plane.

for (int i = 0; i < 3; ++i)
{
    vtkResliceCursorWidget *widget = SliceViewManager::getInstance()->getSliceCursorWidget((ImgPlane)i); //the widget is from the vtkResliceImageViewer

    double origin[3], point1[3], point2[3];
    widget->GetResliceCursorRepresentation()->GetPlaneSource()->GetOrigin(origin);
    widget->GetResliceCursorRepresentation()->GetPlaneSource()->GetPoint1(point1);
    widget->GetResliceCursorRepresentation()->GetPlaneSource()->GetPoint2(point2);


    view->callUpdateImagePlane((ImgPlane)i, origin, point1, point2);  //call to change the plane in MPR
}