Cloned library of VTK-5.0.0 with extra build files for internal package management.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.1 KiB

/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkDataObjectSource.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkDataObjectSource.h"
#include "vtkDataObject.h"
#include "vtkInformation.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkDataObjectSource, "$Revision: 1.17 $");
vtkDataObjectSource::vtkDataObjectSource()
{
// A source has no inputs by default.
this->SetNumberOfInputPorts(0);
this->SetOutput(vtkDataObject::New());
// Releasing data for pipeline parallism.
// Filters will know it is empty.
this->Outputs[0]->ReleaseData();
this->Outputs[0]->Delete();
}
//----------------------------------------------------------------------------
vtkDataObject *vtkDataObjectSource::GetOutput()
{
if (this->NumberOfOutputs < 1)
{
return NULL;
}
return (vtkDataObject *)(this->Outputs[0]);
}
//----------------------------------------------------------------------------
void vtkDataObjectSource::SetOutput(vtkDataObject *output)
{
this->vtkSource::SetNthOutput(0, output);
}
//----------------------------------------------------------------------------
int vtkDataObjectSource::FillOutputPortInformation(int port,
vtkInformation* info)
{
if(!this->Superclass::FillOutputPortInformation(port, info))
{
return 0;
}
info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkDataObject");
return 1;
}
//----------------------------------------------------------------------------
void vtkDataObjectSource::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}