24 #ifndef vtkSMTransferFunctionProxy_h 25 #define vtkSMTransferFunctionProxy_h 50 return this->RescaleTransferFunction(range[0], range[1], extend);
52 virtual bool RescaleTransferFunction(
double rangeMin,
double rangeMax,
bool extend =
false);
59 static bool RescaleTransferFunction(
60 vtkSMProxy* proxy,
double rangeMin,
double rangeMax,
bool extend =
false);
73 virtual bool RescaleTransferFunctionToDataRange(
bool extend =
false);
77 return self ?
self->RescaleTransferFunctionToDataRange(extend) :
false;
84 virtual bool InvertTransferFunction();
90 static bool InvertTransferFunction(
vtkSMProxy*);
99 virtual bool MapControlPointsToLogSpace(
bool inverse =
false);
110 return self ?
self->MapControlPointsToLogSpace(inverse) :
false;
132 virtual bool ApplyPreset(
const Json::Value&
value,
bool rescale =
true);
136 return self ?
self->ApplyPreset(value, rescale) :
false;
140 virtual bool ApplyPreset(
const char* presetname,
bool rescale =
true);
144 return self ?
self->ApplyPreset(presetname, rescale) :
false;
152 virtual Json::Value GetStateAsPreset();
153 static Json::Value GetStateAsPreset(
vtkSMProxy* proxy);
162 virtual bool ApplyColorMap(
const char* text);
174 return self ?
self->ApplyColorMap(text) :
false;
186 return self ?
self->ApplyColorMap(xml) :
false;
204 return self ?
self->SaveColorMap(xml) :
false;
213 virtual bool IsScalarBarVisible(
vtkSMProxy* view);
223 return self ?
self->IsScalarBarVisible(view) :
false;
242 return self ?
self->FindScalarBarRepresentation(view) : NULL;
256 return self ?
self->UpdateScalarBarsComponentTitle(arrayInfo) :
false;
266 virtual bool ComputeDataRange(
double range[2]);
270 return self ?
self->ComputeDataRange(range) :
false;
282 virtual vtkTable* ComputeDataHistogramTable(
int numberOfBins);
286 return self ?
self->ComputeDataHistogramTable(numberOfBins) :
nullptr;
299 return self ?
self->GetHistogramTableCache() :
nullptr;
305 virtual bool ComputeAvailableAnnotations(
bool extend =
false);
309 return self ?
self->ComputeAvailableAnnotations(extend) :
false;
318 virtual void ResetPropertiesToDefaults(
const char* arrayName,
bool preserve_range);
320 vtkSMProxy* proxy,
const char* arrayName,
bool preserve_range =
false)
325 self->ResetPropertiesToDefaults(arrayName, preserve_range);
328 using Superclass::ResetPropertiesToXMLDefaults;
335 void ResetRescaleModeToGlobalSetting();
343 static Json::Value ConvertLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
344 static Json::Value ConvertLegacyColorMapXMLToJSON(
const char* xmlcontents);
352 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
vtkPVXMLElement* xml);
353 static Json::Value ConvertMultipleLegacyColorMapXMLToJSON(
const char* xmlcontents);
359 static bool ConvertLegacyColorMapsToJSON(
const char* inxmlfile,
const char* outjsonfile);
366 virtual bool GetRange(
double range[2]);
370 return self ?
self->GetRange(range) :
false;
390 void RestoreFromSiteSettingsOrXML(
const char* arrayName);
396 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...