Commit e27ae6a9 authored by Berk Geveci's avatar Berk Geveci Committed by George Zagaris
Browse files

Removed unused keys.

Change-Id: I24bf3b0959bf6e22543bb526b26d9fda14ab4c20
parent b33d3183
......@@ -45,7 +45,6 @@ vtkInformationKeyMacro(vtkDemandDrivenPipeline, REQUEST_DATA, Request);
vtkInformationKeyMacro(vtkDemandDrivenPipeline, REQUEST_DATA_NOT_GENERATED, Request);
vtkInformationKeyMacro(vtkDemandDrivenPipeline, REQUEST_DATA_OBJECT, Request);
vtkInformationKeyMacro(vtkDemandDrivenPipeline, REQUEST_INFORMATION, Request);
vtkInformationKeyMacro(vtkDemandDrivenPipeline, REQUEST_REGENERATE_INFORMATION, Integer);
//----------------------------------------------------------------------------
vtkDemandDrivenPipeline::vtkDemandDrivenPipeline()
......@@ -171,8 +170,7 @@ int vtkDemandDrivenPipeline::ProcessRequest(vtkInformation* request,
if(this->Algorithm && request->Has(REQUEST_DATA_OBJECT()))
{
// if we are up to date then short circuit
if (this->PipelineMTime < this->DataObjectTime.GetMTime()
&& ! request->Has(REQUEST_REGENERATE_INFORMATION()))
if (this->PipelineMTime < this->DataObjectTime.GetMTime())
{
return 1;
}
......@@ -184,8 +182,7 @@ int vtkDemandDrivenPipeline::ProcessRequest(vtkInformation* request,
// Make sure our output data type is up-to-date.
int result = 1;
if(this->PipelineMTime > this->DataObjectTime.GetMTime()
|| request->Has(REQUEST_REGENERATE_INFORMATION()))
if(this->PipelineMTime > this->DataObjectTime.GetMTime())
{
// Request data type from the algorithm.
result = this->ExecuteDataObject(request,inInfoVec,outInfoVec);
......@@ -214,8 +211,7 @@ int vtkDemandDrivenPipeline::ProcessRequest(vtkInformation* request,
if(this->Algorithm && request->Has(REQUEST_INFORMATION()))
{
// if we are up to date then short circuit
if (this->PipelineMTime < this->InformationTime.GetMTime()
&& ! request->Has(REQUEST_REGENERATE_INFORMATION()))
if (this->PipelineMTime < this->InformationTime.GetMTime())
{
return 1;
}
......@@ -227,8 +223,7 @@ int vtkDemandDrivenPipeline::ProcessRequest(vtkInformation* request,
// Make sure our output information is up-to-date.
int result = 1;
if(this->PipelineMTime > this->InformationTime.GetMTime()
|| request->Has(REQUEST_REGENERATE_INFORMATION()))
if(this->PipelineMTime > this->InformationTime.GetMTime())
{
// Make sure input types are valid before algorithm does anything.
......
......@@ -131,11 +131,6 @@ public:
// vtkDataObjectTypes::NewDataObject() instead.
static vtkDataObject* NewDataObject(const char* type);
// Description:
// Key to be used for REQUEST_INFORMATION and REQUEST_DATA_OBJECT
// passes when you modification time should not be taken into account.
static vtkInformationIntegerKey* REQUEST_REGENERATE_INFORMATION();
protected:
vtkDemandDrivenPipeline();
~vtkDemandDrivenPipeline();
......
......@@ -52,7 +52,6 @@ vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, WHOLE_EXTENT,
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, UPDATE_EXTENT, IntegerVector, 6);
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, COMBINED_UPDATE_EXTENT, IntegerVector, 6);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UNRESTRICTED_UPDATE_EXTENT, Integer);
vtkInformationKeyRestrictedMacro(vtkStreamingDemandDrivenPipeline, WHOLE_BOUNDING_BOX, DoubleVector, 6);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, TIME_STEPS, DoubleVector);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, UPDATE_TIME_STEP, Double);
......@@ -61,7 +60,6 @@ vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, TIME_RANGE, DoubleVecto
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, BOUNDS, DoubleVector);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, TIME_DEPENDENT_INFORMATION, Integer);
vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, TIME_LABEL_ANNOTATION, String);
//----------------------------------------------------------------------------
class vtkStreamingDemandDrivenPipelineToDataObjectFriendship
......@@ -474,7 +472,6 @@ vtkStreamingDemandDrivenPipeline
for(int i=0; i < outInfoVec->GetNumberOfInformationObjects(); ++i)
{
vtkInformation* outInfo = outInfoVec->GetInformationObject(i);
outInfo->CopyEntry(inInfo, WHOLE_BOUNDING_BOX());
outInfo->CopyEntry(inInfo, WHOLE_EXTENT());
outInfo->CopyEntry(inInfo, TIME_STEPS());
outInfo->CopyEntry(inInfo, TIME_RANGE());
......@@ -1685,48 +1682,3 @@ int vtkStreamingDemandDrivenPipeline::GetRequestExactExtent(int port)
}
return info->Get(EXACT_EXTENT());
}
//----------------------------------------------------------------------------
int vtkStreamingDemandDrivenPipeline::SetWholeBoundingBox(int port,
double extent[6])
{
if(!this->OutputPortIndexInRange(port, "set whole bounding box on"))
{
return 0;
}
vtkInformation* info = this->GetOutputInformation(port);
int modified = 0;
double oldBoundingBox[6];
this->GetWholeBoundingBox(port, oldBoundingBox);
if(oldBoundingBox[0] != extent[0] || oldBoundingBox[1] != extent[1] ||
oldBoundingBox[2] != extent[2] || oldBoundingBox[3] != extent[3] ||
oldBoundingBox[4] != extent[4] || oldBoundingBox[5] != extent[5])
{
modified = 1;
info->Set(WHOLE_BOUNDING_BOX(), extent, 6);
}
return modified;
}
//----------------------------------------------------------------------------
void vtkStreamingDemandDrivenPipeline::GetWholeBoundingBox(int port, double extent[6])
{
double *bbox = this->GetWholeBoundingBox(port);
memcpy(extent, bbox, 6*sizeof(double));
}
//----------------------------------------------------------------------------
double* vtkStreamingDemandDrivenPipeline::GetWholeBoundingBox(int port)
{
static double emptyBoundingBox[6] = {0,-1,0,-1,0,-1};
if(!this->OutputPortIndexInRange(port, "get whole bounding box from"))
{
return emptyBoundingBox;
}
vtkInformation* info = this->GetOutputInformation(port);
if(!info->Has(WHOLE_BOUNDING_BOX()))
{
info->Set(WHOLE_BOUNDING_BOX(), emptyBoundingBox, 6);
}
return info->Get(WHOLE_BOUNDING_BOX());
}
......@@ -126,14 +126,6 @@ public:
int SetRequestExactExtent(int port, int flag);
int GetRequestExactExtent(int port);
// Description:
// Set/Get the whole bounding box of an output port data object.
// The whole whole bounding box is meta data for data sets. It gets
// set by the algorithm during the update information pass.
int SetWholeBoundingBox(int port, double bb[6]);
void GetWholeBoundingBox(int port, double bb[6]);
double* GetWholeBoundingBox(int port);
// Description:
// Key defining a request to propagate the update extent upstream.
static vtkInformationRequestKey* REQUEST_UPDATE_EXTENT();
......@@ -184,11 +176,6 @@ public:
// any requested size.
static vtkInformationIntegerKey* UNRESTRICTED_UPDATE_EXTENT();
// Description:
// Key to store the bounding box of the entire data set in pipeline
// information.
static vtkInformationDoubleVectorKey* WHOLE_BOUNDING_BOX();
// Description:
// Key to specify the request for exact extent in pipeline information.
static vtkInformationIntegerKey* EXACT_EXTENT();
......@@ -201,10 +188,6 @@ public:
// Key to store available time range for continuous sources.
static vtkInformationDoubleVectorKey* TIME_RANGE();
// Description:
// Key to store the label that should be used for labelling the time in the UI
static vtkInformationStringKey* TIME_LABEL_ANNOTATION();
// Description:
// Update time steps requested by the pipeline.
static vtkInformationDoubleKey* UPDATE_TIME_STEP();
......
......@@ -84,7 +84,6 @@ protected:
~vtkRegularPolygonSource() {}
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int NumberOfSides;
double Center[3];
......
......@@ -329,18 +329,5 @@ int vtkSphereSource::RequestInformation(
outInfo->Set(vtkStreamingDemandDrivenPipeline::CAN_HANDLE_PIECE_REQUEST(), 1);
/*
outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),
-1);
*/
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(),
this->Center[0] - this->Radius,
this->Center[0] + this->Radius,
this->Center[1] - this->Radius,
this->Center[1] + this->Radius,
this->Center[2] - this->Radius,
this->Center[2] + this->Radius);
return 1;
}
......@@ -46,20 +46,6 @@ vtkTessellatedBoxSource::~vtkTessellatedBoxSource()
{
}
//----------------------------------------------------------------------------
//
int vtkTessellatedBoxSource::RequestInformation(
vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed(inputVector),
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation* outInfo = outputVector->GetInformationObject(0);
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(),
this->Bounds,6);
return 1;
}
// Duplicate point method.
// Each face of the box is defined by the 3 points: an origin, a point along
// a first axis, a point along a second axis. The axes are oriented
......@@ -119,8 +105,7 @@ int vtkTessellatedBoxSource::RequestData(
vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
// get the bounds
double bounds[6];
outInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(),bounds);
double* bounds = this->Bounds;
vtkPoints *points = vtkPoints::New();
......
......@@ -92,12 +92,6 @@ protected:
vtkTessellatedBoxSource();
~vtkTessellatedBoxSource();
// Description:
// Called by the superclass. Send the WHOLE_BOUNDING_BOX key.
virtual int RequestInformation(vtkInformation *request,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector);
// Description:
// Called by the superclass. Actual creation of the points and cells
// happens here.
......
......@@ -363,30 +363,6 @@ int vtkGlobeSource::RequestData(
return 1;
}
//----------------------------------------------------------------------------
int vtkGlobeSource::RequestInformation(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **vtkNotUsed(inputVector),
vtkInformationVector *outputVector)
{
// get the info object
vtkInformation *outInfo = outputVector->GetInformationObject(0);
/*
outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),
-1);
*/
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(),
-this->Radius, this->Radius,
-this->Radius, this->Radius,
-this->Radius, this->Radius);
return 1;
}
//----------------------------------------------------------------------------
void vtkGlobeSource::PrintSelf(ostream& os, vtkIndent indent)
{
......
......@@ -123,10 +123,6 @@ protected:
vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
int RequestInformation(
vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
void AddPoint(
double theta, double phi, double radius,
......
......@@ -99,16 +99,6 @@ void vtkXMLImageDataReader::SetupOutputInformation(vtkInformation *outInfo)
outInfo->Set(vtkDataObject::ORIGIN(), this->Origin, 3);
outInfo->Set(vtkDataObject::SPACING(), this->Spacing, 3);
double bounds[6];
bounds[0] = this->Origin[0] + this->Spacing[0] * this->WholeExtent[0];
bounds[1] = this->Origin[0] + this->Spacing[0] * this->WholeExtent[1];
bounds[2] = this->Origin[1] + this->Spacing[1] * this->WholeExtent[2];
bounds[3] = this->Origin[1] + this->Spacing[1] * this->WholeExtent[3];
bounds[4] = this->Origin[2] + this->Spacing[2] * this->WholeExtent[4];
bounds[5] = this->Origin[2] + this->Spacing[2] * this->WholeExtent[5];
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_BOUNDING_BOX(),
bounds, 6);
}
......
......@@ -45,7 +45,6 @@ vtkDataArray GetTuple3 307 3
vtkDataArray GetTuple4 307 4
vtkDataArray GetTuple9 307 9
vtkDataObject GetUpdateExtent 304 6
vtkDataObject GetWholeBoundingBox 307 6
vtkDataObject GetWholeExtent 304 6
vtkDataSet GetBounds 307 6
vtkDataSet GetCenter 307 3
......
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