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

Method CloneInput

Rendering/Volume/vtkGPUVolumeRayCastMapper.cxx:274–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void vtkGPUVolumeRayCastMapper::CloneInput(vtkDataSet* input, int port)
275{
276 // Clone input into a transformed input
277 vtkDataSet* clone;
278 vtkDataSet* currentData = this->FindData(port, this->TransformedInputs);
279 if (!currentData)
280 {
281 if (vtkImageData::SafeDownCast(input))
282 {
283 if (vtkUniformGrid::SafeDownCast(input))
284 {
285 clone = vtkUniformGrid::New();
286 }
287 else
288 {
289 clone = vtkImageData::New();
290 }
291 }
292 else if (vtkRectilinearGrid::SafeDownCast(input))
293 {
294 clone = vtkRectilinearGrid::New();
295 }
296 else
297 {
298 clone = nullptr;
299 }
300 clone->Register(this);
301 this->TransformedInputs[port] = clone;
302 clone->Delete();
303
304 this->LastInputs[port] = nullptr;
305 }
306 else
307 {
308 clone = this->TransformedInputs[port];
309 }
310
311 // If we have a timestamp change or data change then create a new clone
312 if (input != this->LastInputs[port] ||
313 (input != nullptr && input->GetMTime() > clone->GetMTime()))
314 {
315 this->LastInputs[port] = input;
316 this->TransformInput(port);
317 }
318}
319
320int vtkGPUVolumeRayCastMapper::ValidateInput(vtkVolumeProperty* property, int port)
321{

Callers 2

CloneInputsMethod · 0.95
ValidateInputMethod · 0.95

Calls 6

FindDataMethod · 0.95
TransformInputMethod · 0.95
DeleteMethod · 0.65
NewFunction · 0.50
RegisterMethod · 0.45
GetMTimeMethod · 0.45

Tested by

no test coverage detected