12 #ifndef vtkSMTransferFunctionProxy_h 13 #define vtkSMTransferFunctionProxy_h 40 return this->RescaleTransferFunction(range[0], range[1], extend);
42 virtual bool RescaleTransferFunction(
double rangeMin,
double rangeMax,
bool extend =
false);
49 static bool RescaleTransferFunction(
50 vtkSMProxy* proxy,
double rangeMin,
double rangeMax,
bool extend =
false);
63 virtual bool RescaleTransferFunctionToDataRange(
bool extend =
false);
67 return self ?
self->RescaleTransferFunctionToDataRange(extend) :
false;
74 virtual bool InvertTransferFunction();
80 static bool InvertTransferFunction(
vtkSMProxy*);
89 virtual bool MapControlPointsToLogSpace(
bool inverse =
false);
100 return self ?
self->MapControlPointsToLogSpace(inverse) :
false;
122 virtual bool ApplyPreset(
const Json::Value&
value,
bool rescale =
true);
126 return self ?
self->ApplyPreset(value, rescale) :
false;
130 virtual bool ApplyPreset(
const char* presetname,
bool rescale =
true);
134 return self ?
self->ApplyPreset(presetname, rescale) :
false;
142 virtual Json::Value GetStateAsPreset();
143 static Json::Value GetStateAsPreset(
vtkSMProxy* proxy);
152 virtual bool ApplyColorMap(
const char* text);
164 return self ?
self->ApplyColorMap(text) :
false;
176 return self ?
self->ApplyColorMap(xml) :
false;
194 return self ?
self->SaveColorMap(xml) :
false;
203 virtual bool IsScalarBarVisible(
vtkSMProxy* view);
213 return self ?
self->IsScalarBarVisible(view) :
false;
232 return self ?
self->FindScalarBarRepresentation(view) :
nullptr;
246 return self ?
self->UpdateScalarBarsComponentTitle(arrayInfo) :
false;
256 virtual bool ComputeDataRange(
double range[2]);
260 return self ?
self->ComputeDataRange(range) :
false;
272 virtual vtkTable* ComputeDataHistogramTable(
int numberOfBins);
276 return self ?
self->ComputeDataHistogramTable(numberOfBins) :
nullptr;
289 return self ?
self->GetHistogramTableCache() :
nullptr;
295 virtual bool ComputeAvailableAnnotations(
bool extend =
false);
299 return self ?
self->ComputeAvailableAnnotations(extend) :
false;
308 virtual void ResetPropertiesToDefaults(
const char* arrayName,
bool preserve_range);
310 vtkSMProxy* proxy,
const char* arrayName,
bool preserve_range =
false)
315 self->ResetPropertiesToDefaults(arrayName, preserve_range);
318 using Superclass::ResetPropertiesToXMLDefaults;
327 static Json::Value ConvertLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
328 static Json::Value ConvertLegacyColorMapXMLToJSON(
const char* xmlcontents);
336 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
337 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
const char* xmlcontents);
343 static bool ConvertLegacyColorMapsToJSON(
const char* inxmlfile,
const char* outjsonfile);
349 static Json::Value ConvertVisItColorMapXMLToJSON(
vtkPVXMLElement* xml);
350 static Json::Value ConvertVisItColorMapXMLToJSON(
const char* xmlcontents);
358 virtual bool GetRange(
double range[2]);
362 return self ?
self->GetRange(range) :
false;
383 void RestoreFromSiteSettingsOrXML(
const char* arrayName);
389 double LastRange[2] = { 0, 1 };
static vtkTable * GetHistogramTableCache(vtkSMProxy *proxy)
Helper method used to recover the last histogram computed by ComputeDataHistogram Returns the histogr...
static vtkSMProxy * FindScalarBarRepresentation(vtkSMProxy *proxy, vtkSMProxy *view)
Safely call FindScalarBarRepresentation(..) after casting the proxy to the appropriate type...
virtual bool MapControlPointsToLogSpace(bool inverse=false)
Remaps control points by normalizing in linear-space and then interpolating in log-space.
virtual bool RescaleTransferFunction(const double range[2], bool extend=false)
Rescale the "RGBPoints" for the transfer function to match the new range.
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
static bool MapControlPointsToLogSpace(vtkSMProxy *proxy, bool inverse=false)
Safely call MapControlPointsToLogSpace() after casting the proxy to the appropriate type...
static bool MapControlPointsToLinearSpace(vtkSMProxy *proxy)
Safely call MapControlPointsToLinearSpace() after casting the proxy to the appropriate type...
static bool ApplyPreset(vtkSMProxy *proxy, const Json::Value &value, bool rescale=true)
Apply a preset.
vtkSMTransferFunctionProxy is the proxy used for "PVLookupTable", "ColorTransferFunction" and "Piecew...
static bool ApplyPreset(vtkSMProxy *proxy, const char *presetname, bool rescale=true)
static bool RescaleTransferFunctionToDataRange(vtkSMProxy *proxy, bool extend=false)
Locates all representations that are currently using this transfer function and then rescales the tra...
static void ResetPropertiesToDefaults(vtkSMProxy *proxy, const char *arrayName, bool preserve_range=false)
Helper method to reset a transfer function proxy to its defaults.
static bool SaveColorMap(vtkSMProxy *proxy, vtkPVXMLElement *xml)
Safely call ApplyColorMap(..) after casting the proxy to the appropriate type.
static bool ComputeDataRange(vtkSMProxy *proxy, double range[2])
Helper method used by RescaleTransferFunctionToDataRange() to compute range from all visible represen...
static bool ApplyColorMap(vtkSMProxy *proxy, vtkPVXMLElement *xml)
Safely call ApplyColorMap(..) after casting the proxy to the appropriate type.
static bool ComputeAvailableAnnotations(vtkSMProxy *proxy, bool extend=false)
virtual bool MapControlPointsToLinearSpace()
static vtkSMProxy * New()
proxy for a VTK object(s) on a server
static bool IsScalarBarVisible(vtkSMProxy *proxy, vtkSMProxy *view)
Safely call IsScalarBarVisible(..) after casting the proxy to the appropriate type.
vtkSmartPointer< vtkTable > HistogramTableCache
static bool GetRange(vtkSMProxy *proxy, double range[2])
Returns current transfer function data range.
void operator=(const vtkSMProxy &)=delete
static bool RescaleTransferFunction(vtkSMProxy *proxy, const double range[2], bool extend=false)
Safely call RescaleTransferFunction() after casting the proxy to appropriate type.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static bool ApplyColorMap(vtkSMProxy *proxy, const char *text)
Safely call ApplyColorMap(..) after casting the proxy to the appropriate type.
static vtkTable * ComputeDataHistogramTable(vtkSMProxy *proxy, int numberOfBins)
Helper method used to compute a histogram with provided number of bins based on the data from all the...
static bool UpdateScalarBarsComponentTitle(vtkSMProxy *proxy, vtkPVArrayInformation *arrayInfo)
Update component titles for all scalar bars connected to this transfer function proxy.
static vtkSMTransferFunctionProxy * SafeDownCast(vtkObject *o)
virtual vtkTable * GetHistogramTableCache()
Helper method used to recover the last histogram computed by ComputeDataHistogram Returns the histogr...