14 #include "vtkExecutive.h" 15 #include "vtkGarbageCollector.h" 16 #include "vtkGeometryFilter.h" 17 #include "vtkInformation.h" 18 #include "vtkObjectFactory.h" 19 #include "vtkPolyData.h" 20 #include "vtkPolyDataMapper.h" 21 #include "vtkScalarsToColors.h" 22 #include "vtkUnstructuredGrid.h" 55 this->SetInputDataObject(input);
62 return vtkUnstructuredGrid::SafeDownCast(this->GetExecutive()->GetInputData(0, 0));
92 vtkErrorMacro(<<
"No input!\n");
98 if (this->LookupTable ==
nullptr)
100 this->CreateDefaultLookupTable();
102 this->LookupTable->Build();
108 vtkGeometryFilter *gf = vtkGeometryFilter::New();
109 vtkPolyDataMapper *pm = vtkPolyDataMapper::New();
110 pm->SetInputConnection(gf->GetOutputPort());
118 if (this->ClippingPlanes != this->
PolyDataMapper->GetClippingPlanes())
126 this->
m_BoundingObject->GetGeometry()->CalculateBoundingBoxRelativeToTransform(
nullptr)->GetBounds();
127 this->
GeometryExtractor->SetExtent(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5]);
140 this->
PolyDataMapper->SetScalarVisibility(this->GetScalarVisibility());
141 this->
PolyDataMapper->SetUseLookupTableScalarRange(this->GetUseLookupTableScalarRange());
144 this->
PolyDataMapper->SetInterpolateScalarsBeforeMapping(this->GetInterpolateScalarsBeforeMapping());
147 if (this->ScalarMode == VTK_SCALAR_MODE_USE_POINT_FIELD_DATA ||
148 this->ScalarMode == VTK_SCALAR_MODE_USE_CELL_FIELD_DATA)
150 if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_ID)
152 this->
PolyDataMapper->ColorByArrayComponent(this->ArrayId, ArrayComponent);
156 this->
PolyDataMapper->ColorByArrayComponent(this->ArrayName, ArrayComponent);
167 this->Superclass::PrintSelf(os, indent);
171 os << indent <<
"Poly Mapper: (" << this->
PolyDataMapper <<
")\n";
175 os << indent <<
"Poly Mapper: (none)\n";
184 os << indent <<
"Geometry Extractor: (none)\n";
191 vtkMTimeType mTime = this->vtkMapper::GetMTime();
194 if (this->LookupTable !=
nullptr)
196 time = this->LookupTable->GetMTime();
197 mTime = (time > mTime ? time : mTime);
206 info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(),
"vtkUnstructuredGrid");
213 this->Superclass::ReportReferences(collector);
216 vtkGarbageCollectorReport(collector, this->
GeometryExtractor,
"GeometryExtractor");
217 vtkGarbageCollectorReport(collector, this->
PolyDataMapper,
"PolyDataMapper");
~vtkUnstructuredGridMapper() override
vtkUnstructuredGridMapper()
mitk::BoundingObject::Pointer m_BoundingObject
void SetInput(vtkUnstructuredGrid *input)
vtkRenderer * GetVtkRenderer() const
vtkStandardNewMacro(vtkUnstructuredGridMapper)
Organizes the rendering process.
void PrintSelf(ostream &os, vtkIndent indent) override
void ReportReferences(vtkGarbageCollector *) override
static void info(const char *fmt,...)
void Render(vtkRenderer *ren, vtkActor *act) override
superclass of all bounding objects (cylinder, cuboid,...)
vtkGeometryFilter * GeometryExtractor
void ReleaseGraphicsResources(vtkWindow *) override
void SetBoundingObject(mitk::BoundingObject *bo)
vtkPolyDataMapper * PolyDataMapper
int FillInputPortInformation(int port, vtkInformation *info) override
vtkUnstructuredGrid * GetInput()
BoundingBoxType::BoundsArrayType BoundsArrayType
vtkMTimeType GetMTime() override