MCPcopy Create free account
hub / github.com/Kitware/VTK / GetInternalAnnotationOutputPort

Method GetInternalAnnotationOutputPort

Views/Core/vtkDataRepresentation.cxx:195–222  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

193
194//------------------------------------------------------------------------------
195vtkAlgorithmOutput* vtkDataRepresentation::GetInternalAnnotationOutputPort(int port, int conn)
196{
197 if (port >= this->GetNumberOfInputPorts() || conn >= this->GetNumberOfInputConnections(port))
198 {
199 vtkErrorMacro(
200 "Port " << port << ", connection " << conn << " is not defined on this representation.");
201 return nullptr;
202 }
203
204 // Create a new filter in the cache if necessary.
205 std::pair<int, int> p(port, conn);
206 if (this->Implementation->ConvertDomainInternal.find(p) ==
207 this->Implementation->ConvertDomainInternal.end())
208 {
209 this->Implementation->ConvertDomainInternal[p] =
210 vtkSmartPointer<vtkConvertSelectionDomain>::New();
211 }
212
213 // Set up the inputs to the cached filter.
214 vtkConvertSelectionDomain* domain = this->Implementation->ConvertDomainInternal[p];
215 domain->SetInputConnection(0, this->GetAnnotationLink()->GetOutputPort(0));
216 domain->SetInputConnection(1, this->GetAnnotationLink()->GetOutputPort(1));
217 domain->SetInputConnection(2, this->GetInternalOutputPort(port, conn));
218
219 // Output port 0 of the convert domain filter is the linked
220 // annotation(s) (the vtkAnnotationLayers object).
221 return domain->GetOutputPort();
222}
223
224//------------------------------------------------------------------------------
225vtkAlgorithmOutput* vtkDataRepresentation::GetInternalSelectionOutputPort(int port, int conn)

Callers 15

SetVTKSelectionMethod · 0.45
UpdateMethod · 0.45
SetVTKSelectionMethod · 0.45
UpdateMethod · 0.45
SetVTKSelectionMethod · 0.45

Calls 9

GetInternalOutputPortMethod · 0.95
GetAnnotationLinkMethod · 0.80
NewFunction · 0.50
GetNumberOfInputPortsMethod · 0.45
findMethod · 0.45
endMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45

Tested by

no test coverage detected