22 #ifndef vtkSMPVRepresentationProxy_h 23 #define vtkSMPVRepresentationProxy_h 30 #include <unordered_map> 50 this->SetLastBlocksLookupTable({ blockSelector }, proxy);
52 void SetLastBlocksLookupTable(
const std::vector<std::string>& blockSelectors,
vtkSMProxy* proxy);
55 return this->GetLastBlocksLookupTables({ blockSelector }).front();
57 std::vector<vtkSMProxy*> GetLastBlocksLookupTables(
58 const std::vector<std::string>& blockSelectors);
67 virtual bool GetUsingScalarColoring();
70 return this->GetBlocksUsingScalarColoring({ blockSelector }).front();
72 virtual std::vector<vtkTypeBool> GetBlocksUsingScalarColoring(
73 const std::vector<std::string>& blockSelectors);
74 virtual bool GetAnyBlockUsingScalarColoring();
85 return this->GetBlocksLookupTables(view, { blockSelector }).front();
87 std::vector<vtkSMProxy*> GetBlocksLookupTables(
88 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
99 bool UpdateScalarBarRange(
vtkSMProxy* view,
bool deleteRange);
100 std::vector<vtkTypeBool> UpdateBlocksScalarBarRange(
vtkSMProxy* view,
bool deleteRange);
110 virtual bool SetScalarColoring(
const char* arrayName,
int attributeType);
112 const std::string& blockSelector,
const char* arrayName,
int attributeType)
114 return this->SetBlocksScalarColoring({ blockSelector }, arrayName, attributeType).front();
116 virtual std::vector<vtkTypeBool> SetBlocksScalarColoring(
117 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType);
128 virtual bool SetScalarColoring(
const char* arrayName,
int attributeType,
int component);
130 const std::string& blockSelector,
const char* arrayName,
int attributeType,
int component)
132 return this->SetBlocksScalarColoring({ blockSelector }, arrayName, attributeType, component)
135 virtual std::vector<vtkTypeBool> SetBlocksScalarColoring(
136 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType,
155 virtual bool RescaleTransferFunctionToDataRange(
bool extend =
false,
bool force =
true);
157 const std::string& blockSelector,
bool extend =
false,
bool force =
true)
159 return this->RescaleBlocksTransferFunctionToDataRange({ blockSelector }, extend, force).front();
161 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRange(
162 const std::vector<std::string>& blockSelectors,
bool extend =
false,
bool force =
true);
183 virtual bool RescaleTransferFunctionToDataRange(
184 const char* arrayName,
int attributeType,
bool extend =
false,
bool force =
true);
186 const char* arrayName,
int attributeType,
bool extend =
false,
bool force =
true)
189 ->RescaleBlocksTransferFunctionToDataRange(
190 { blockSelector }, arrayName, attributeType, extend, force)
193 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRange(
194 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType,
195 bool extend =
false,
bool force =
true);
203 virtual bool RescaleTransferFunctionToDataRangeOverTime();
206 return this->RescaleBlocksTransferFunctionToDataRangeOverTime({ blockSelector }).front();
208 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRangeOverTime(
209 const std::vector<std::string>& blockSelectors);
219 virtual bool RescaleTransferFunctionToDataRangeOverTime(
const char* arrayName,
int attributeType);
221 const std::string& blockSelector,
const char* arrayName,
int attributeType)
224 ->RescaleBlocksTransferFunctionToDataRangeOverTime(
225 { blockSelector }, arrayName, attributeType)
228 virtual std::vector<vtkTypeBool> RescaleBlocksTransferFunctionToDataRangeOverTime(
229 const std::vector<std::string>& blockSelectors,
const char* arrayName,
int attributeType);
237 virtual bool RescaleTransferFunctionToVisibleRange(
vtkSMProxy* view);
238 virtual bool RescaleTransferFunctionToVisibleRange(
239 vtkSMProxy* view,
const char* arrayName,
int attributeType);
247 virtual bool SetScalarBarVisibility(
vtkSMProxy* view,
bool visible);
249 vtkSMProxy* view,
const std::string& blockSelector,
bool visible)
251 return this->SetBlocksScalarBarVisibility(view, { blockSelector }, visible).front();
253 virtual std::vector<vtkTypeBool> SetBlocksScalarBarVisibility(
254 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors,
bool visible);
265 virtual bool HideScalarBarIfNotNeeded(
vtkSMProxy* view);
266 virtual bool HideBlocksScalarBarIfNotNeeded(
vtkSMProxy* view);
274 virtual bool IsScalarBarVisible(
vtkSMProxy* view);
277 return this->IsBlocksScalarBarVisible(view, { blockSelector }).front();
279 virtual std::vector<vtkTypeBool> IsBlocksScalarBarVisible(
280 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
291 const std::string& blockSelector)
293 return this->GetBlocksArrayInformationForColorArray({ blockSelector }).front();
295 virtual std::vector<vtkPVArrayInformation*> GetBlocksArrayInformationForColorArray(
296 const std::vector<std::string>& blockSelectors);
305 double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
bool force =
false);
307 const std::string& blockSelector,
double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
311 ->GetBlocksProminentValuesInformationForColorArray(
312 { blockSelector }, uncertaintyAllowed, fraction, force)
315 virtual std::vector<vtkPVProminentValuesInformation*>
316 GetBlocksProminentValuesInformationForColorArray(
const std::vector<std::string>& blockSelectors,
317 double uncertaintyAllowed = 1e-6,
double fraction = 1e-3,
bool force =
false);
324 int GetEstimatedNumberOfAnnotationsOnScalarBar(
vtkSMProxy* view);
326 vtkSMProxy* view,
const std::string& blockSelector)
328 return this->GetBlocksEstimatedNumberOfAnnotationsOnScalarBars(view, { blockSelector }).front();
330 std::vector<int> GetBlocksEstimatedNumberOfAnnotationsOnScalarBars(
331 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
345 bool GetVolumeIndependentRanges();
357 int IsScalarBarStickyVisible(
vtkSMProxy* view);
360 return this->IsBlocksScalarBarStickyVisible(view, { blockSelector }).front();
362 std::vector<int> IsBlocksScalarBarStickyVisible(
363 vtkSMProxy* view,
const std::vector<std::string>& blockSelectors);
377 return this->GetBlocksColorArrays({ blockSelector }).front();
379 std::vector<std::pair<int, std::string>> GetBlocksColorArrays(
380 const std::vector<std::string>& blockSelectors);
383 return this->GetBlockColorArray(blockSelector).first;
387 return this->GetBlockColorArray(blockSelector).second;
397 this->SetBlocksUseSeparateColorMap({ blockSelector }, use);
399 void SetBlocksUseSeparateColorMap(
const std::vector<std::string>& blockSelectors,
bool use);
402 return this->GetBlocksUseSeparateColorMaps({ blockSelector }).front();
404 std::vector<vtkTypeBool> GetBlocksUseSeparateColorMaps(
405 const std::vector<std::string>& blockSelectors);
420 void OnPropertyUpdated(
vtkObject*,
unsigned long,
void* calldata);
446 bool InReadXMLAttributes;
447 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
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.