ParaView
vtkSpreadSheetView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSpreadSheetView.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef vtkSpreadSheetView_h
25 #define vtkSpreadSheetView_h
26 
27 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
28 #include "vtkPVView.h"
29 
30 #include <map> // For Column Visibilities
31 
32 class vtkCSVExporter;
35 class vtkPassArrays;
36 class vtkReductionFilter;
38 class vtkTable;
39 class vtkVariant;
40 
41 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkSpreadSheetView : public vtkPVView
42 {
43 public:
44  static vtkSpreadSheetView* New();
45  vtkTypeMacro(vtkSpreadSheetView, vtkPVView);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
52  virtual void StillRender() { this->StreamToClient(); }
53 
59  virtual void InteractiveRender() { this->StreamToClient(); }
60 
64  virtual void Update();
65 
67 
72  void SetShowExtractedSelection(bool);
73  vtkBooleanMacro(ShowExtractedSelection, bool);
74  vtkGetMacro(ShowExtractedSelection, bool);
76 
78 
81  void SetColumnVisibility(int fieldAssociation, const char* column, int visibility);
82  void ClearColumnVisibilities();
84 
89  vtkIdType GetNumberOfColumns();
90 
95  vtkIdType GetNumberOfRows();
96 
101  const char* GetColumnName(vtkIdType index);
102 
104 
110  vtkVariant GetValue(vtkIdType row, vtkIdType col);
111  vtkVariant GetValueByName(vtkIdType row, const char* columnName);
113 
117  bool IsRowSelected(vtkIdType row);
118 
122  bool IsAvailable(vtkIdType row);
123 
124  //***************************************************************************
125  // Forwarded to vtkSortedTableStreamer.
130  void SetColumnNameToSort(const char*);
131  void SetColumnNameToSort() { this->SetColumnNameToSort(NULL); }
132 
137  void SetComponentToSort(int val);
138 
143  void SetInvertSortOrder(bool);
144 
149  void SetBlockSize(vtkIdType val);
150 
154  bool Export(vtkCSVExporter* exporter);
155 
159  void ClearCache();
160 
161  // INTERNAL METHOD. Don't call directly.
162  vtkTable* FetchBlockCallback(vtkIdType blockindex, bool filterColumnForExport = false);
163 
164 protected:
167 
174  int StreamToClient();
175 
176  void OnRepresentationUpdated();
177 
178  vtkTable* FetchBlock(vtkIdType blockindex, bool filterColumnForExport = false);
179 
185  vtkPassArrays* PassFilter;
186 
187  vtkIdType NumberOfRows;
188 
189  enum
190  {
191  FETCH_BLOCK_TAG = 394732
192  };
193 
194 private:
195  vtkSpreadSheetView(const vtkSpreadSheetView&) VTK_DELETE_FUNCTION;
196  void operator=(const vtkSpreadSheetView&) VTK_DELETE_FUNCTION;
197 
198  class vtkInternals;
199  friend class vtkInternals;
200  vtkInternals* Internals;
201 
202  std::map<std::pair<int, std::string>, int> ColumnVisibilities;
203  bool SomethingUpdated;
204 
205  unsigned long RMICallbackTag;
206 };
207 
208 #endif
return a sorted subset of the original table
void PrintSelf(ostream &os, vtkIndent indent)
Moves data from the server root node to the client.
vtkReductionFilter * ReductionFilter
vtkSpreadSheetView is a vtkPVView subclass for a view used to show any data as a spreadsheet.
vtkMarkSelectedRows * TableSelectionMarker
baseclass for all ParaView views.
Definition: vtkPVView.h:38
virtual void InteractiveRender()
Triggers a interactive render.
vtkClientServerMoveData * DeliveryFilter
vtkSortedTableStreamer * TableStreamer
vtkMarkSelectedRows is used by vtkSpreadSheetView to marks rows from the vtkTable generated by vtkSor...
exporter used by certain views to export data as a CSV file.
vtkPassArrays * PassFilter
virtual void Update()
Overridden to not call Update() directly on the input representations, instead use ProcessViewRequest...
virtual void StillRender()
Triggers a high-resolution render.
A generic filter that can reduce any type of dataset using any reduction algorithm.