| 155 | } |
| 156 | |
| 157 | std::vector<float> GetFieldAsFloat( |
| 158 | vtkDataObject* obj, const char* name, const std::vector<float>& d) |
| 159 | { |
| 160 | vtkFieldData* fd = obj->GetFieldData(); |
| 161 | if (!fd) |
| 162 | { |
| 163 | return d; |
| 164 | } |
| 165 | vtkFloatArray* fa = vtkFloatArray::SafeDownCast(fd->GetAbstractArray(name)); |
| 166 | if (!fa) |
| 167 | { |
| 168 | return d; |
| 169 | } |
| 170 | std::vector<float> v(d.size()); |
| 171 | fa->GetTypedTuple(0, v.data()); |
| 172 | return v; |
| 173 | } |
| 174 | |
| 175 | vtkSmartPointer<vtkImageReader2> SetupTextureReader(const std::string& texturePath) |
| 176 | { |
no test coverage detected