------------------------------------------------------------------------------ This method is passed a input and output region, and executes the filter algorithm to fill the output from the input. It just executes a switch statement to call the correct function for the regions data types.
| 1148 | // It just executes a switch statement to call the correct function for |
| 1149 | // the regions data types. |
| 1150 | void vtkImageData::CopyAndCastFrom(vtkImageData* inData, int extent[6]) |
| 1151 | { |
| 1152 | void* inPtr = inData->GetScalarPointerForExtent(extent); |
| 1153 | |
| 1154 | if (inPtr == nullptr) |
| 1155 | { |
| 1156 | vtkErrorMacro("Scalars not allocated."); |
| 1157 | return; |
| 1158 | } |
| 1159 | |
| 1160 | int scalarType = inData->GetPointData()->GetScalars()->GetDataType(); |
| 1161 | switch (scalarType) |
| 1162 | { |
| 1163 | vtkTemplateMacro(vtkImageDataCastExecute(inData, static_cast<VTK_TT*>(inPtr), this, extent)); |
| 1164 | default: |
| 1165 | vtkErrorMacro(<< "Execute: Unknown input ScalarType"); |
| 1166 | return; |
| 1167 | } |
| 1168 | } |
| 1169 | |
| 1170 | //------------------------------------------------------------------------------ |
| 1171 | void vtkImageData::Crop(const int* updateExtent) |
no test coverage detected