22 #ifndef vtkSMPVRepresentationProxy_h 23 #define vtkSMPVRepresentationProxy_h 31 #include <unordered_map> 48 void SetLastLUTProxy(
vtkSMProxy* proxy) { this->SetLastLookupTable(proxy); }
51 vtkSMProxy* GetLastLUTProxy() {
return this->GetLastLookupTable(); }
55 this->SetLastBlocksLookupTable({ blockSelector }, proxy);
57 void SetLastBlocksLookupTable(
const std::vector<std::string>& blockSelectors,
vtkSMProxy* proxy);
60 return this->GetLastBlocksLookupTables({ blockSelector }).front();
62 std::vector<vtkSMProxy*> GetLastBlocksLookupTables(
63 const std::vector<std::string>& blockSelectors);
72 virtual bool GetUsingScalarColoring();
75 return this->GetBlocksUsingScalarColoring({ blockSelector }).front();
77 virtual std::vector<vtkTypeBool> GetBlocksUsingScalarColoring(
78 const std::vector<std::string>& blockSelectors);
79 virtual bool GetAnyBlockUsingScalarColoring();
92 return this->GetBlocksLookupTables(view, { blockSelector }).front();
94 std::vector<vtkSMProxy*> GetBlocksLookupTables(
95 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
106 bool UpdateScalarBarRange(
vtkSMProxy* view,
bool deleteRange);
107 std::vector<vtkTypeBool> UpdateBlocksScalarBarRange(
vtkSMProxy* view,
bool deleteRange);
117 virtual bool SetScalarColoring(
const char* arrayName,
int attributeType);
119 const std::string& blockSelector,
const char* arrayName,
int attributeType)
121 return this->SetBlocksScalarColoring({ blockSelector }, arrayName, attributeType).front();
123 virtual std::vector<vtkTypeBool> SetBlocksScalarColoring(
124 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType);
135 virtual bool SetScalarColoring(
const char* arrayName,
int attributeType,
int component);
137 const std::string& blockSelector,
const char* arrayName,
int attributeType,
int component)
139 return this->SetBlocksScalarColoring({ blockSelector }, arrayName, attributeType, component)
142 virtual std::vector<vtkTypeBool> SetBlocksScalarColoring(
143 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType,
162 virtual bool RescaleTransferFunctionToDataRange(
bool extend =
false,
bool force =
true);
164 const std::string& blockSelector,
bool extend =
false,
bool force =
true)
166 return this->RescaleBlocksTransferFunctionToDataRange({ blockSelector }, extend, force).front();
168 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRange(
169 const std::vector<std::string>& blockSelectors,
bool extend =
false,
bool force =
true);
190 virtual bool RescaleTransferFunctionToDataRange(
191 const char* arrayName,
int attributeType,
bool extend =
false,
bool force =
true);
193 const char* arrayName,
int attributeType,
bool extend =
false,
bool force =
true)
196 ->RescaleBlocksTransferFunctionToDataRange(
197 { blockSelector }, arrayName, attributeType, extend, force)
200 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRange(
201 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType,
202 bool extend =
false,
bool force =
true);
210 virtual bool RescaleTransferFunctionToDataRangeOverTime();
213 return this->RescaleBlocksTransferFunctionToDataRangeOverTime({ blockSelector }).front();
215 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRangeOverTime(
216 const std::vector<std::string>& blockSelectors);
226 virtual bool RescaleTransferFunctionToDataRangeOverTime(
const char* arrayName,
int attributeType);
228 const std::string& blockSelector,
const char* arrayName,
int attributeType)
231 ->RescaleBlocksTransferFunctionToDataRangeOverTime(
232 { blockSelector }, arrayName, attributeType)
235 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRangeOverTime(
236 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType);
244 virtual bool RescaleTransferFunctionToVisibleRange(
vtkSMProxy* view);
245 virtual bool RescaleTransferFunctionToVisibleRange(
246 vtkSMProxy* view,
const char* arrayName,
int attributeType);
254 virtual bool SetScalarBarVisibility(
vtkSMProxy* view,
bool visible);
256 vtkSMProxy* view,
const std::string& blockSelector,
bool visible)
258 return this->SetBlocksScalarBarVisibility(view, { blockSelector }, visible).front();
260 virtual std::vector<vtkTypeBool> SetBlocksScalarBarVisibility(
261 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors,
bool visible);
272 virtual bool HideScalarBarIfNotNeeded(
vtkSMProxy* view);
273 virtual bool HideBlocksScalarBarIfNotNeeded(
vtkSMProxy* view);
281 virtual bool IsScalarBarVisible(
vtkSMProxy* view);
284 return this->IsBlocksScalarBarVisible(view, { blockSelector }).front();
286 virtual std::vector<vtkTypeBool> IsBlocksScalarBarVisible(
287 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
298 const std::string& blockSelector)
300 return this->GetBlocksArrayInformationForColorArray({ blockSelector }).front();
302 virtual std::vector<vtkPVArrayInformation*> GetBlocksArrayInformationForColorArray(
303 const std::vector<std::string>& blockSelectors);
312 double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
bool force =
false);
314 const std::string& blockSelector,
double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
318 ->GetBlocksProminentValuesInformationForColorArray(
319 { blockSelector }, uncertaintyAllowed, fraction, force)
322 virtual std::vector<vtkPVProminentValuesInformation*>
323 GetBlocksProminentValuesInformationForColorArray(
const std::vector<std::string>& blockSelectors,
324 double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
bool force =
false);
331 int GetEstimatedNumberOfAnnotationsOnScalarBar(
vtkSMProxy* view);
333 vtkSMProxy* view,
const std::string& blockSelector)
335 return this->GetBlocksEstimatedNumberOfAnnotationsOnScalarBars(view, { blockSelector }).front();
337 std::vector<int> GetBlocksEstimatedNumberOfAnnotationsOnScalarBars(
338 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
352 bool GetVolumeIndependentRanges();
364 int IsScalarBarStickyVisible(
vtkSMProxy* view);
367 return this->IsBlocksScalarBarStickyVisible(view, { blockSelector }).front();
369 std::vector<int> IsBlocksScalarBarStickyVisible(
370 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
384 return this->GetBlocksColorArrays({ blockSelector }).front();
386 std::vector<std::pair<int, std::string>> GetBlocksColorArrays(
387 const std::vector<std::string>& blockSelectors);
390 return this->GetBlockColorArray(blockSelector).first;
394 return this->GetBlockColorArray(blockSelector).second;
404 this->SetBlocksUseSeparateColorMap({ blockSelector }, use);
406 void SetBlocksUseSeparateColorMap(
const std::vector<std::string>& blockSelectors,
bool use);
409 return this->GetBlocksUseSeparateColorMaps({ blockSelector }).front();
411 std::vector<vtkTypeBool> GetBlocksUseSeparateColorMaps(
412 const std::vector<std::string>& blockSelectors);
427 void OnPropertyUpdated(
vtkObject*,
unsigned long,
void* calldata);
453 bool InReadXMLAttributes;
454 std::set<std::string> RepresentationSubProxies;
Proxy for a representations.
virtual bool SetBlockScalarBarVisibility(vtkSMProxy *view, const std::string &blockSelector, bool visible)
Set the scalar bar visibility.
virtual bool IsBlockScalarBarVisible(vtkSMProxy *view, const std::string &blockSelector)
Check scalar bar visibility.
void CreateVTKObjects() override
Call superclass' and then assigns a new executive (vtkCompositeDataPipeline)
virtual bool SetBlockScalarColoring(const std::string &blockSelector, const char *arrayName, int attributeType, int component)
Enable/disable scalar coloring using the specified array.
#define VTKREMOTINGVIEWS_EXPORT
void SetBlockUseSeparateColorMap(const std::string &blockSelector, bool use)
Set/Get if we should use a separate color map for this block.
representation for "Render View" like views in ParaView.
virtual bool RescaleBlockTransferFunctionToDataRange(const std::string &blockSelector, const char *arrayName, int attributeType, bool extend=false, bool force=true)
Rescales the color transfer function and opacity transfer function using the current data range for t...
void SetLastBlockLookupTable(const std::string &blockSelector, vtkSMProxy *proxy)
Set/get last LUT proxy.
virtual bool RescaleBlockTransferFunctionToDataRangeOverTime(const std::string &blockSelector, const char *arrayName, int attributeType)
Rescales the color transfer function and opacity transfer function using the current data range over ...
int GetBlockColorArrayAssociation(const std::string &blockSelector)
Set/Get the block color array name.
virtual void SetPropertyModifiedFlag(const char *name, int flag)
Note on property modified flags: The modified flag of each property associated with a proxy is stored...
virtual vtkPVArrayInformation * GetBlockArrayInformationForColorArray(const std::string &blockSelector)
Returns the array information for the data array used for scalar coloring, from input data...
bool GetBlockUseSeparateColorMap(const std::string &blockSelector)
Set/Get if we should use a separate color map for this block.
std::unordered_map< std::string, vtkSmartPointer< vtkSMProxy > > LastBlocksLookupTables
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
virtual vtkPVProminentValuesInformation * GetBlockProminentValuesInformationForColorArray(const std::string &blockSelector, double uncertaintyAllowed=1e-6, double fraction=1e-3, bool force=false)
Call vtkSMRepresentationProxy::GetProminentValuesInformation() for the array used for scalar color...
int GetBlockEstimatedNumberOfAnnotationsOnScalarBar(vtkSMProxy *view, const std::string &blockSelector)
Get an estimated number of annotation shown on this representation scalar bar.
virtual bool SetRepresentationType(const char *type)
Set the representation type.
int IsBlockScalarBarStickyVisible(vtkSMProxy *view, const std::string &blockSelector)
Checks if the scalar bar of this representation in view is sticky visible, i.e.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMProxy * GetLastBlockLookupTable(const std::string &blockSelector)
Set/get last LUT proxy.
virtual bool SetBlockScalarColoring(const std::string &blockSelector, const char *arrayName, int attributeType)
Enable/disable scalar coloring using the specified array.
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
std::string GetBlockColorArrayName(const std::string &blockSelector)
Set/Get the block color array name.
proxy for a VTK object(s) on a server
vtkSMProxy * GetBlockLookupTable(vtkSMProxy *view, const std::string &blockSelector)
Returns the lut proxy of this representation in the given view.
std::pair< int, std::string > GetBlockColorArray(const std::string &blockSelector)
Set/Get the block color array name.
virtual bool RescaleBlockTransferFunctionToDataRange(const std::string &blockSelector, bool extend=false, bool force=true)
Rescales the color transfer function and opacity transfer function using the current data range...
int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element) override
Read attributes from an XML element.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
virtual bool GetBlockUsingScalarColoring(const std::string &blockSelector)
Returns true if scalar coloring is enabled.
static vtkSMRepresentationProxy * New()
virtual void ViewUpdated(vtkSMProxy *view)
Called after the view updates.
virtual bool RescaleBlockTransferFunctionToDataRangeOverTime(const std::string &blockSelector)
Rescales the color transfer function and opacity transfer function using the current data range over ...
vtkSmartPointer< vtkSMProxy > LastLookupTable
Used as a memory of what was the last LUT proxy linked to this representation.