Commit 40ae72d2 authored by Andrew Bauer's avatar Andrew Bauer Committed by Kitware Robot

Merge topic 'resampletoimage_remove_member_object'

f72fb3b4 Removing class member object to reduce memory footprint
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !5027
parents c3eafc4e f72fb3b4
...@@ -67,7 +67,6 @@ void vtkResampleToImage::PrintSelf(ostream& os, vtkIndent indent) ...@@ -67,7 +67,6 @@ void vtkResampleToImage::PrintSelf(ostream& os, vtkIndent indent)
<< this->SamplingDimensions[0] << " x " << this->SamplingDimensions[0] << " x "
<< this->SamplingDimensions[1] << " x " << this->SamplingDimensions[1] << " x "
<< this->SamplingDimensions[2] << endl; << this->SamplingDimensions[2] << endl;
this->Prober->PrintSelf(os, indent);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -156,7 +155,7 @@ int vtkResampleToImage::FillOutputPortInformation(int vtkNotUsed(port), ...@@ -156,7 +155,7 @@ int vtkResampleToImage::FillOutputPortInformation(int vtkNotUsed(port),
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
const char* vtkResampleToImage::GetMaskArrayName() const const char* vtkResampleToImage::GetMaskArrayName() const
{ {
return this->Prober->GetValidPointMaskArrayName(); return "vtkValidPointMask";
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -235,11 +234,12 @@ void vtkResampleToImage::PerformResampling(vtkDataObject *input, ...@@ -235,11 +234,12 @@ void vtkResampleToImage::PerformResampling(vtkDataObject *input,
structure->SetSpacing(spacing); structure->SetSpacing(spacing);
structure->SetExtent(probingExtent); structure->SetExtent(probingExtent);
this->Prober->SetInputData(structure); vtkNew<vtkCompositeDataProbeFilter> prober;
this->Prober->SetSourceData(input); prober->SetInputData(structure);
this->Prober->Update(); prober->SetSourceData(input);
prober->Update();
output->ShallowCopy(this->Prober->GetOutput()); output->ShallowCopy(prober->GetOutput());
output->GetFieldData()->PassData(input->GetFieldData()); output->GetFieldData()->PassData(input->GetFieldData());
} }
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
class vtkDataObject; class vtkDataObject;
class vtkImageData; class vtkImageData;
class vtkCompositeDataProbeFilter;
class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
{ {
...@@ -118,7 +117,6 @@ protected: ...@@ -118,7 +117,6 @@ protected:
bool UseInputBounds; bool UseInputBounds;
double SamplingBounds[6]; double SamplingBounds[6];
int SamplingDimensions[3]; int SamplingDimensions[3];
vtkNew<vtkCompositeDataProbeFilter> Prober;
private: private:
vtkResampleToImage(const vtkResampleToImage&) = delete; 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