------------------------------------------------------------------------------
| 193 | |
| 194 | //------------------------------------------------------------------------------ |
| 195 | vtkAlgorithmOutput* 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 | //------------------------------------------------------------------------------ |
| 225 | vtkAlgorithmOutput* vtkDataRepresentation::GetInternalSelectionOutputPort(int port, int conn) |
no test coverage detected