24 #ifndef vtkSMTransferFunctionProxy_h 25 #define vtkSMTransferFunctionProxy_h 52 return this->RescaleTransferFunction(range[0], range[1], extend);
54 virtual bool RescaleTransferFunction(
double rangeMin,
double rangeMax,
bool extend =
false);
61 static bool RescaleTransferFunction(
62 vtkSMProxy* proxy,
double rangeMin,
double rangeMax,
bool extend =
false);
75 virtual bool RescaleTransferFunctionToDataRange(
bool extend =
false);
79 return self ?
self->RescaleTransferFunctionToDataRange(extend) :
false;
86 virtual bool InvertTransferFunction();
92 static bool InvertTransferFunction(
vtkSMProxy*);
101 virtual bool MapControlPointsToLogSpace(
bool inverse =
false);
112 return self ?
self->MapControlPointsToLogSpace(inverse) :
false;
134 virtual bool ApplyPreset(
const Json::Value&
value,
bool rescale =
true);
138 return self ?
self->ApplyPreset(value, rescale) :
false;
142 virtual bool ApplyPreset(
const char* presetname,
bool rescale =
true);
146 return self ?
self->ApplyPreset(presetname, rescale) :
false;
154 virtual Json::Value GetStateAsPreset();
155 static Json::Value GetStateAsPreset(
vtkSMProxy* proxy);
164 virtual bool ApplyColorMap(
const char* text);
176 return self ?
self->ApplyColorMap(text) :
false;
188 return self ?
self->ApplyColorMap(xml) :
false;
206 return self ?
self->SaveColorMap(xml) :
false;
215 virtual bool IsScalarBarVisible(
vtkSMProxy* view);
225 return self ?
self->IsScalarBarVisible(view) :
false;
244 return self ?
self->FindScalarBarRepresentation(view) :
nullptr;
258 return self ?
self->UpdateScalarBarsComponentTitle(arrayInfo) :
false;
268 virtual bool ComputeDataRange(
double range[2]);
272 return self ?
self->ComputeDataRange(range) :
false;
284 virtual vtkTable* ComputeDataHistogramTable(
int numberOfBins);
288 return self ?
self->ComputeDataHistogramTable(numberOfBins) :
nullptr;
301 return self ?
self->GetHistogramTableCache() :
nullptr;
307 virtual bool ComputeAvailableAnnotations(
bool extend =
false);
311 return self ?
self->ComputeAvailableAnnotations(extend) :
false;
320 virtual void ResetPropertiesToDefaults(
const char* arrayName,
bool preserve_range);
322 vtkSMProxy* proxy,
const char* arrayName,
bool preserve_range =
false)
327 self->ResetPropertiesToDefaults(arrayName, preserve_range);
330 using Superclass::ResetPropertiesToXMLDefaults;
339 static Json::Value ConvertLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
340 static Json::Value ConvertLegacyColorMapXMLToJSON(
const char* xmlcontents);
348 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
349 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
const char* xmlcontents);
355 static bool ConvertLegacyColorMapsToJSON(
const char* inxmlfile,
const char* outjsonfile);
361 static Json::Value ConvertVisItColorMapXMLToJSON(
vtkPVXMLElement* xml);
362 static Json::Value ConvertVisItColorMapXMLToJSON(
const char* xmlcontents);
370 virtual bool GetRange(
double range[2]);
374 return self ?
self->GetRange(range) :
false;
394 void RestoreFromSiteSettingsOrXML(
const char* arrayName);
400 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...