------------------------------------------------------------------------------
| 143 | |
| 144 | //------------------------------------------------------------------------------ |
| 145 | vtkDataRepresentation* vtkView::SetRepresentationFromInputConnection(vtkAlgorithmOutput* conn) |
| 146 | { |
| 147 | if (this->ReuseSingleRepresentation && this->GetNumberOfRepresentations() > 0) |
| 148 | { |
| 149 | this->GetRepresentation()->SetInputConnection(conn); |
| 150 | return this->GetRepresentation(); |
| 151 | } |
| 152 | vtkDataRepresentation* rep = this->CreateDefaultRepresentation(conn); |
| 153 | if (!rep) |
| 154 | { |
| 155 | vtkErrorMacro("Could not add representation from input connection because " |
| 156 | "no default representation was created for the given input connection."); |
| 157 | return nullptr; |
| 158 | } |
| 159 | |
| 160 | this->SetRepresentation(rep); |
| 161 | rep->Delete(); |
| 162 | return rep; |
| 163 | } |
| 164 | |
| 165 | //------------------------------------------------------------------------------ |
| 166 | void vtkView::AddRepresentation(vtkDataRepresentation* rep) |