Commit bb7a7c15 authored by Charles Law's avatar Charles Law
Browse files

Set the output extent from the input extent

parent ffadd122
......@@ -148,6 +148,25 @@ void vtkImageClip::ComputeOutputImageInformation(vtkImageRegion *inRegion,
}
//----------------------------------------------------------------------------
// Change the imageExtent
void vtkImageClip::ResetOutputImageExtent()
{
vtkImageRegion *region;
if ( ! this->Input)
{
vtkErrorMacro("ResetOutputImageExtent: No input");
return;
}
region = new vtkImageRegion;
this->Input->UpdateImageInformation(region);
this->SetOutputImageExtent(VTK_IMAGE_DIMENSIONS, region->GetImageExtent());
region->Delete();
}
//----------------------------------------------------------------------------
// Do nothing. Every thing was done by ComputeImageInformation
void vtkImageClip::Execute(vtkImageRegion *inRegion,
......
......@@ -75,6 +75,9 @@ public:
void GetOutputImageExtent(int dim, int *extent);
vtkImageGetExtentMacro(OutputImageExtent);
// Description:
// Sets the output image extent to be the input image extent.
void ResetOutputImageExtent();
protected:
// Time when OutputImageExtent was computed.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment