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

Method NewImageDataCopy

Common/DataModel/vtkUniformGrid.cxx:30–48  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

28
29//------------------------------------------------------------------------------
30vtkImageData* vtkUniformGrid::NewImageDataCopy()
31{
32 vtkImageData* copy = vtkImageData::New();
33
34 copy->ShallowCopy(this);
35
36 double origin[3];
37 double spacing[3];
38 this->GetOrigin(origin);
39 this->GetSpacing(spacing);
40 // First set the extent of the copy to empty so that
41 // the next call computes the DataDescription for us
42 copy->SetExtent(0, -1, 0, -1, 0, -1);
43 copy->SetExtent(this->GetExtent());
44 copy->SetOrigin(origin);
45 copy->SetSpacing(spacing);
46
47 return copy;
48}
49
50//------------------------------------------------------------------------------
51vtkUniformGrid* vtkUniformGrid::GetData(vtkInformation* info)

Callers

nothing calls this directly

Calls 8

NewFunction · 0.50
ShallowCopyMethod · 0.45
GetOriginMethod · 0.45
GetSpacingMethod · 0.45
SetExtentMethod · 0.45
GetExtentMethod · 0.45
SetOriginMethod · 0.45
SetSpacingMethod · 0.45

Tested by

no test coverage detected