Superclass of all classes generating unstructured grids (instances of class UnstructuredGrid) as output. More...
#include <mitkUnstructuredGridSource.h>


Public Types | |
| typedef UnstructuredGridSource | Self |
| typedef BaseProcess | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer < const Self > | ConstPointer |
| typedef itk::DataObject::Pointer | DataObjectPointer |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| virtual DataObjectPointer | MakeOutput (unsigned int idx) |
| void | SetOutput (mitk::UnstructuredGrid *output) |
| mitk::UnstructuredGrid * | GetOutput () |
| mitk::UnstructuredGrid * | GetOutput (unsigned int idx) |
| virtual void | GraftOutput (mitk::UnstructuredGrid *graft) |
| virtual void | GraftNthOutput (unsigned int idx, mitk::UnstructuredGrid *graft) |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| UnstructuredGridSource () | |
| virtual | ~UnstructuredGridSource () |
Superclass of all classes generating unstructured grids (instances of class UnstructuredGrid) as output.
In itk and vtk the generated result of a ProcessObject is only guaranteed to be up-to-date, when Update() of the ProcessObject or the generated DataObject is called immediately before access of the data stored in the DataObject. This is also true for subclasses of mitk::BaseProcess and thus for mitk::UnstructuredGridSource.
Definition at line 37 of file mitkUnstructuredGridSource.h.
| typedef itk::SmartPointer<const Self> mitk::UnstructuredGridSource::ConstPointer |
Reimplemented in mitk::VtkUnstructuredGridReader.
Definition at line 40 of file mitkUnstructuredGridSource.h.
| typedef itk::DataObject::Pointer mitk::UnstructuredGridSource::DataObjectPointer |
Definition at line 42 of file mitkUnstructuredGridSource.h.
| typedef itk::SmartPointer<Self> mitk::UnstructuredGridSource::Pointer |
Reimplemented in mitk::VtkUnstructuredGridReader.
Definition at line 40 of file mitkUnstructuredGridSource.h.
Reimplemented in mitk::VtkUnstructuredGridReader.
Definition at line 40 of file mitkUnstructuredGridSource.h.
Reimplemented in mitk::VtkUnstructuredGridReader.
Definition at line 40 of file mitkUnstructuredGridSource.h.
| mitk::UnstructuredGridSource::UnstructuredGridSource | ( | ) | [protected] |
Definition at line 22 of file mitkUnstructuredGridSource.cpp.
References MakeOutput(), and mitk::BaseProcess::SetNthOutput().
{
// Create the output. We use static_cast<> here because we know the default
// output must be of type UnstructuredGrid
mitk::UnstructuredGrid::Pointer output
= static_cast<mitk::UnstructuredGrid*>(this->MakeOutput(0).GetPointer());
Superclass::SetNumberOfRequiredOutputs(1);
Superclass::SetNthOutput(0, output.GetPointer());
}
| mitk::UnstructuredGridSource::~UnstructuredGridSource | ( | ) | [protected, virtual] |
Definition at line 33 of file mitkUnstructuredGridSource.cpp.
{
}
| virtual const char* mitk::UnstructuredGridSource::GetClassName | ( | ) | const [virtual] |
Reimplemented in mitk::VtkUnstructuredGridReader.
| mitk::UnstructuredGrid * mitk::UnstructuredGridSource::GetOutput | ( | void | ) |
Definition at line 43 of file mitkUnstructuredGridSource.cpp.
{
if (this->GetNumberOfOutputs() < 1)
{
return 0;
}
return static_cast<mitk::UnstructuredGrid*>
(this->BaseProcess::GetOutput(0));
}
| mitk::UnstructuredGrid * mitk::UnstructuredGridSource::GetOutput | ( | unsigned int | idx ) |
Definition at line 54 of file mitkUnstructuredGridSource.cpp.
{
return static_cast<mitk::UnstructuredGrid*>
(this->ProcessObject::GetOutput(idx));
}
| void mitk::UnstructuredGridSource::GraftNthOutput | ( | unsigned int | idx, |
| mitk::UnstructuredGrid * | graft | ||
| ) | [virtual] |
Definition at line 71 of file mitkUnstructuredGridSource.cpp.
References mitk::UnstructuredGrid::CopyInformation(), and mitk::UnstructuredGrid::SetRequestedRegion().
{
if (idx < this->GetNumberOfOutputs())
{
mitk::UnstructuredGrid * output = this->GetOutput(idx);
if (output && graft)
{
// grab a handle to the bulk data of the specified data object
// output->SetPixelContainer( graft->GetPixelContainer() ); @FIXME!!!!
// copy the region ivars of the specified data object
output->SetRequestedRegion( graft );//graft->GetRequestedRegion() );
// output->SetLargestPossibleRegion( graft->GetLargestPossibleRegion() ); @FIXME!!!!
// output->SetBufferedRegion( graft->GetBufferedRegion() ); @FIXME!!!!
// copy the meta-information
output->CopyInformation( graft );
}
}
}
| void mitk::UnstructuredGridSource::GraftOutput | ( | mitk::UnstructuredGrid * | graft ) | [virtual] |
Definition at line 66 of file mitkUnstructuredGridSource.cpp.
{
this->GraftNthOutput(0, graft);
}
| mitk::UnstructuredGridSource::DataObjectPointer mitk::UnstructuredGridSource::MakeOutput | ( | unsigned int | idx ) | [virtual] |
Definition at line 37 of file mitkUnstructuredGridSource.cpp.
References mitk::UnstructuredGrid::New().
Referenced by UnstructuredGridSource().
{
return static_cast<itk::DataObject*>(mitk::UnstructuredGrid::New().GetPointer());
}
| static Pointer mitk::UnstructuredGridSource::New | ( | ) | [static] |
Reimplemented in mitk::VtkUnstructuredGridReader.
| void mitk::UnstructuredGridSource::SetOutput | ( | mitk::UnstructuredGrid * | output ) |
Definition at line 60 of file mitkUnstructuredGridSource.cpp.
References mitk::BaseProcess::SetNthOutput().
{
itkWarningMacro(<< "SetOutput(): This method is slated to be removed from ITK. Please use GraftOutput() in possible combination with DisconnectPipeline() instead." );
BaseProcess::SetNthOutput(0, output);
}
1.7.2