Commit 91ef7c1b authored by Berk Geveci's avatar Berk Geveci Committed by Code Review
Browse files

Merge topic 'vtk-4-removal-minor-cleanup' into master

1d39ce67 Minor cleanup, part of the VTK 4 compatibility removal.
02aa2488 Minor cleanup, part of the VTK 4 compatibility removal.
parents 58ac4e47 1d39ce67
......@@ -157,55 +157,11 @@ int vtkMoleculeAlgorithm::RequestUpdateExtent(
int vtkMoleculeAlgorithm::RequestData(
vtkInformation* request,
vtkInformationVector** vtkNotUsed( inputVector ),
vtkInformationVector* outputVector)
vtkInformationVector* vtkNotUsed(outputVector) )
{
// the default implimentation is to do what the old pipeline did find what
// output is requesting the data, and pass that into ExecuteDataWithInformation
// which output port did the request come from
int outputPort =
request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT());
// if output port is negative then that means this filter is calling the
// update directly, in that case just assume port 0
if (outputPort == -1)
{
outputPort = 0;
}
// get the data object
vtkInformation *outInfo =
outputVector->GetInformationObject(outputPort);
// call ExecuteData
this->ExecuteDataWithInformation( outInfo->Get(vtkDataObject::DATA_OBJECT()), outInfo );
return 1;
}
//----------------------------------------------------------------------------
// Assume that any source that implements ExecuteDataWithInformation
// can handle an empty extent.
void vtkMoleculeAlgorithm::ExecuteDataWithInformation(
vtkDataObject *output,
vtkInformation *outInfo)
{
// I want to find out if the requested extent is empty.
if (output && this->UpdateExtentIsEmpty(outInfo, output))
{
output->Initialize();
return;
}
this->Execute();
}
//----------------------------------------------------------------------------
void vtkMoleculeAlgorithm::Execute()
{
vtkErrorMacro(<< "Definition of Execute() method should be in subclass and you should really use the ExecuteData(vtkInformation *request,...) signature instead");
}
//----------------------------------------------------------------------------
void vtkMoleculeAlgorithm::SetInputData(vtkDataObject* input)
{
......
......@@ -76,7 +76,7 @@ public:
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
// SetInputData() for details.
void AddInputData(vtkDataObject *);
void AddInputData(int, vtkDataObject*);
......@@ -103,12 +103,6 @@ protected:
vtkInformationVector**,
vtkInformationVector*);
// Description:
// This method is the old style execute method
virtual void ExecuteDataWithInformation(vtkDataObject *output,
vtkInformation* outInfo);
virtual void Execute();
// see algorithm for more info
virtual int FillOutputPortInformation(int port, vtkInformation* info);
virtual int FillInputPortInformation(int port, vtkInformation* info);
......
......@@ -124,11 +124,6 @@ public:
// arrays, etc. are not included in the return value).
virtual unsigned long GetActualMemorySize();
// Description:
// By default, there is no type specific information
virtual void CopyTypeSpecificInformation( vtkDataObject*)
{}
// Description:
// Copy information about this data object from the
// pipeline information to its own Information.
......
......@@ -137,22 +137,6 @@ void vtkImageData::PrepareForNewData()
}
}
//----------------------------------------------------------------------------
// The input data object must be of type vtkImageData or a subclass!
void vtkImageData::CopyTypeSpecificInformation( vtkDataObject *data )
{
vtkImageData *image = static_cast<vtkImageData *>(data);
// Now do the specific stuff
this->SetOrigin( image->GetOrigin() );
this->SetSpacing( image->GetSpacing() );
//this->SetScalarType( image->GetScalarType() );
//this->SetNumberOfScalarComponents(
//image->GetNumberOfScalarComponents() );
}
//----------------------------------------------------------------------------
template <class T>
unsigned long vtkImageDataGetTypeSize(T*)
......
......@@ -295,9 +295,6 @@ public:
static bool HasNumberOfScalarComponents(vtkInformation* meta_data);
int GetNumberOfScalarComponents();
// Must only be called with vtkImageData (or subclass) as input
virtual void CopyTypeSpecificInformation( vtkDataObject *image );
// Description:
// Override these to handle origin, spacing, scalar type, and scalar
// number of components. See vtkDataObject for details.
......
......@@ -23,13 +23,10 @@
// simply change it with SetNumberOfInputPorts etc. See this class
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be vtkAnnotationLayers. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature. For even older filters that don't implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
#ifndef __vtkAnnotationLayersAlgorithm_h
#define __vtkAnnotationLayersAlgorithm_h
......
......@@ -23,13 +23,10 @@
// simply change it with SetNumberOfInputPorts etc. See this classes
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be DataObject. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature, for even older filters that don't implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
#ifndef __vtkDataObjectAlgorithm_h
#define __vtkDataObjectAlgorithm_h
......
......@@ -28,13 +28,10 @@
// simply change it with SetNumberOfInputPorts etc. See this class
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be Graph. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature. For even older filters that don't implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
//
// .SECTION Thanks
// Thanks to Patricia Crossno, Ken Moreland, Andrew Wilson and Brian Wylie from
......
......@@ -28,13 +28,9 @@
// simply change it with SetNumberOfInputPorts etc. See this class
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be Graph. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature. For even older filters that don't implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
//
// .SECTION Thanks
// Thanks to Patricia Crossno, Ken Moreland, Andrew Wilson and Brian Wylie from
......
......@@ -23,13 +23,9 @@
// simply change it with SetNumberOfInputPorts etc. See this classes
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be PiecewiseFunction. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature, for even older filters that don;t implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
#ifndef __vtkPiecewiseFunctionAlgorithm_h
#define __vtkPiecewiseFunctionAlgorithm_h
......
......@@ -22,11 +22,9 @@
// simply change it with SetNumberOfInputPorts etc. See this classes
// contstructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be PointSet. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// RequestDataObject RequestData and ExecuteInformation. The default
// implementation of RequestDataObject will create an output data of the
// same type as the input.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
#ifndef __vtkPointSetAlgorithm_h
......
......@@ -23,13 +23,9 @@
// simply change it with SetNumberOfInputPorts etc. See this classes
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be RectilinearGrid. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature, for even older filters that don;t implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
#ifndef __vtkRectilinearGridAlgorithm_h
#define __vtkRectilinearGridAlgorithm_h
......
......@@ -23,13 +23,9 @@
// simply change it with SetNumberOfInputPorts etc. See this class
// constructor for the default. This class also provides a FillInputPortInfo
// method that by default says that all inputs will be Selection. If that
// isn't the case then please override this method in your subclass. This
// class breaks out the downstream requests into separate functions such as
// ExecuteData and ExecuteInformation. For new algorithms you should
// implement RequestData( request, inputVec, outputVec) but for older filters
// there is a default implementation that calls the old ExecuteData(output)
// signature. For even older filters that don't implement ExecuteData the
// default implementation calls the even older Execute() signature.
// isn't the case then please override this method in your subclass.
// You should implement the subclass's algorithm into
// RequestData( request, inputVec, outputVec).
//
// .SECTION Thanks
// Thanks to Patricia Crossno, Ken Moreland, Andrew Wilson and Brian Wylie from
......
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