----------------------------------------------------------------------------
| 248 | |
| 249 | //---------------------------------------------------------------------------- |
| 250 | bool vtkSMTransferFunctionProxy::ExportTransferFunction( |
| 251 | vtkSMTransferFunctionProxy* colorTransferFunction, |
| 252 | vtkSMTransferFunctionProxy* opacityTransferFunction, const char* tfname, const char* filename, |
| 253 | vtkTypeUInt32 location) |
| 254 | { |
| 255 | Json::Value exportCollection(Json::arrayValue); |
| 256 | Json::Value transferFunction = |
| 257 | vtkSMTransferFunctionProxy::GetStateAsPreset(colorTransferFunction); |
| 258 | transferFunction["Name"] = tfname; |
| 259 | |
| 260 | if (opacityTransferFunction) |
| 261 | { |
| 262 | Json::Value opacities = vtkSMTransferFunctionProxy::GetStateAsPreset(opacityTransferFunction); |
| 263 | if (opacities.isMember("Points")) |
| 264 | { |
| 265 | transferFunction["Points"] = opacities["Points"]; |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | exportCollection.append(transferFunction); |
| 270 | |
| 271 | auto pxm = vtkSMProxyManager::GetProxyManager()->GetActiveSessionProxyManager(); |
| 272 | return pxm->SaveString(exportCollection.toStyledString().c_str(), filename, location); |
| 273 | } |
| 274 | |
| 275 | //---------------------------------------------------------------------------- |
| 276 | bool vtkSMTransferFunctionProxy::RescaleTransferFunction( |
no test coverage detected