Commit f72fb3b4 authored by Andrew Bauer's avatar Andrew Bauer

Removing class member object to reduce memory footprint

Removing a class member object that is a VTK object that's only
really needed in one member function to reduce memory footprint.
parent f5cb5c3f
......@@ -67,7 +67,6 @@ void vtkResampleToImage::PrintSelf(ostream& os, vtkIndent indent)
<< this->SamplingDimensions[0] << " x "
<< this->SamplingDimensions[1] << " x "
<< this->SamplingDimensions[2] << endl;
this->Prober->PrintSelf(os, indent);
}
//----------------------------------------------------------------------------
......@@ -156,7 +155,7 @@ int vtkResampleToImage::FillOutputPortInformation(int vtkNotUsed(port),
//----------------------------------------------------------------------------
const char* vtkResampleToImage::GetMaskArrayName() const
{
return this->Prober->GetValidPointMaskArrayName();
return "vtkValidPointMask";
}
//----------------------------------------------------------------------------
......@@ -235,11 +234,12 @@ void vtkResampleToImage::PerformResampling(vtkDataObject *input,
structure->SetSpacing(spacing);
structure->SetExtent(probingExtent);
this->Prober->SetInputData(structure);
this->Prober->SetSourceData(input);
this->Prober->Update();
vtkNew<vtkCompositeDataProbeFilter> prober;
prober->SetInputData(structure);
prober->SetSourceData(input);
prober->Update();
output->ShallowCopy(this->Prober->GetOutput());
output->ShallowCopy(prober->GetOutput());
output->GetFieldData()->PassData(input->GetFieldData());
}
......
......@@ -32,7 +32,6 @@
class vtkDataObject;
class vtkImageData;
class vtkCompositeDataProbeFilter;
class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
{
......@@ -118,7 +117,6 @@ protected:
bool UseInputBounds;
double SamplingBounds[6];
int SamplingDimensions[3];
vtkNew<vtkCompositeDataProbeFilter> Prober;
private:
vtkResampleToImage(const vtkResampleToImage&) = delete;
......
Markdown is supported
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