------------------------------------------------------------------------------ This function reads a data from a file. The datas extent/axes are assumed to be the same as the file extent/order.
| 127 | // This function reads a data from a file. The datas extent/axes |
| 128 | // are assumed to be the same as the file extent/order. |
| 129 | void vtkHDRReader::ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo) |
| 130 | { |
| 131 | vtkImageData* data = this->AllocateOutputData(output, outInfo); |
| 132 | |
| 133 | if (this->UpdateExtentIsEmpty(outInfo, output)) |
| 134 | { |
| 135 | return; |
| 136 | } |
| 137 | if (this->InternalFileName == nullptr) |
| 138 | { |
| 139 | vtkErrorMacro(<< "Either a FileName or FilePrefix must be specified."); |
| 140 | return; |
| 141 | } |
| 142 | |
| 143 | data->GetPointData()->GetScalars()->SetName("HDRImage"); |
| 144 | |
| 145 | this->ComputeDataIncrements(); |
| 146 | |
| 147 | // Only float value for RGBE data |
| 148 | float* outPtr = reinterpret_cast<float*>(data->GetScalarPointer()); |
| 149 | this->HDRReaderUpdate(data, outPtr); |
| 150 | } |
| 151 | |
| 152 | //------------------------------------------------------------------------------ |
| 153 | void vtkHDRReader::HDRReaderUpdate(vtkImageData* data, float* outPtr) |
nothing calls this directly
no test coverage detected