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

Method GetDataMemorySize

IO/Image/vtkImageExport.cxx:63–81  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

61
62//------------------------------------------------------------------------------
63vtkIdType vtkImageExport::GetDataMemorySize()
64{
65 vtkImageData* input = this->GetInput();
66 if (input == nullptr)
67 {
68 return 0;
69 }
70
71 this->GetInputAlgorithm()->UpdateInformation();
72 vtkInformation* inInfo = this->GetInputInformation();
73 int* extent = inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT());
74 int size = input->GetScalarSize();
75 size *= input->GetNumberOfScalarComponents();
76 size *= (extent[1] - extent[0] + 1);
77 size *= (extent[3] - extent[2] + 1);
78 size *= (extent[5] - extent[4] + 1);
79
80 return size;
81}
82
83//------------------------------------------------------------------------------
84void vtkImageExport::GetDataDimensions(int* dims)

Callers 2

ExportMethod · 0.95
ImportExportFunction · 0.80

Calls 7

GetInputMethod · 0.95
GetInputAlgorithmMethod · 0.95
GetInputInformationMethod · 0.95
GetScalarSizeMethod · 0.80
UpdateInformationMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected