VTK
/build/vtk7-sEajyE/vtk7-7.1.1+dfsg1/Documentation/Doxygen/ChangesVTK-7-1.md
Go to the documentation of this file.
1 Changes in VTK 7.1 {#VTK-7-1-Changes}
2 ==================
3 
4 This page documents API and behavior changes between VTK 7.0 and
5 VTK 7.1
6 
7 Pipeline Update Methods
8 -----------------------
9 
10 The following methods were deprecated in VTK 7.1:
11 
12 ### vtkAlgorithm:
13 
14  int SetUpdateExtentToWholeExtent(int port);
15  int SetUpdateExtentToWholeExtent();
16  void SetUpdateExtent(int port,
17  int piece,int numPieces, int ghostLevel);
18  void SetUpdateExtent(
19  int piece,int numPieces, int ghostLevel);
20  void SetUpdateExtent(int port, int extent[6]);
21  void SetUpdateExtent(int extent[6]);
22 
23 ### vtkStreamingDemandDrivenPipeline:
24 
25  int SetUpdateExtentToWholeExtent(int port);
26  static int SetUpdateExtentToWholeExtent(vtkInformation *);
27  int SetUpdateExtent(int port, int extent[6]);
28  int SetUpdateExtent(int port, int x0, int x1, int y0, int y1, int z0, int z1);
29  static int SetUpdateExtent(vtkInformation *, int extent[6]);
30  int SetUpdateExtent(int port,
31  int piece, int numPieces, int ghostLevel);
32  static int SetUpdateExtent(vtkInformation *,
33  int piece, int numPieces, int ghostLevel);
34  static int SetUpdatePiece(vtkInformation *, int piece);
35  static int SetUpdateNumberOfPieces(vtkInformation *, int n);
36  static int SetUpdateGhostLevel(vtkInformation *, int n);
37  int SetUpdateTimeStep(int port, double time);
38  static int SetUpdateTimeStep(vtkInformation *, double time);
39 
40 The following new methods were added:
41 
42 ### vtkAlgorithm:
43 
44  int Update(int port, vtkInformationVector* requests);
45  int Update(vtkInformation* requests);
46  int UpdatePiece(int piece, int numPieces, int ghostLevels, const int extents[6]=0);
47  int UpdateExtent(const int extents[6]);
48  int UpdateTimeStep(double time,
49  int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0);
50 
51 ### vtkStreamingDemandDrivenPipeline:
52 
53  int Update(int port, vtkInformationVector* requests);
54 
55 The main reason behind these changes is to make requesting a particular time step or a particular spatial subset (extent or pieces) during an update easier and more predictable. Prior to these changes, the following is the best way to request a subset during update:
56 
57  vtkNew<vtkRTAnalyticSource> source;
58  // Set some properties of source here
59  source->UpdateInformation();
60  source->SetUpdateExtent(0, 5, 0, 5, 2, 2);
61  source->Update();
62 
63 Note that the following will not work:
64 
65  vtkNew<vtkRTAnalyticSource> source;
66  // Set some properties of source here
67  // source->UpdateInformation(); <-- this was commented out
68  source->SetUpdateExtent(0, 5, 0, 5, 2, 2);
69  source->Update();
70 
71 This is because when the output of an algorithm is initialized, all request meta-data stored in its OutputInformation is removed. The initialization of the output happens during the first *RequestInformation*, which is why `UpdateInformation()` needs to be called before setting any request values. To make things more complicated, the following will also not work:
72 
73  vtkNew<vtkRTAnalyticSource> source;
74  // Set some properties of source here
75  source->UpdateInformation();
76  source->SetUpdateExtent(0, 5, 0, 5, 2, 2);
77  source->Modified();
78  source->Update();
79 
80 This is because during *RequestInformation*, the extent and piece requests are initialized to default values (which is the whole dataset) and *RequestInformation* is called during update if the algorithm has been modified since the last information update.
81 
82 This necessary sequence of calls has been mostly tribal knowledge and is very error prone. To simplify pipeline updates with requests, we introduced a new set of methods. With the new API, our example would be:
83 
84  vtkNew<vtkRTAnalyticSource> source;
85  int updateExtent[6] = {0, 5, 0, 5, 2, 2};
86  // Set some properties of source here
87  source->UpdateExtent(updateExtent);
88 
89 To ask for a particular time step from a time source, we would do something like this:
90 
91  vtkNew<vtkExodusIIReader> reader;
92  // Set properties here
93  reader->UpdateTimeStep(0.5);
94  // or
95  reader->UpdateTimeStep(0.5, 1, 2, 1);
96 
97 The last call asks for time value 0.5 and the first of two pieces with one ghost level.
98 
99 The new algorithm also supports directly passing a number of keys to make requests:
100 
101  typedef vtkStreamingDemandDrivenPipeline vtkSDDP;
102  vtkNew<vtkRTAnalyticSource> source;
103  int updateExtent[6] = {0, 5, 0, 5, 2, 2};
104  vtkNew<vtkInformation> requests;
105  requests->Set(vtkSDDP::UPDATE_EXTENT(), updateExtent, 6);
106  reader->Update(requests.GetPointer());
107 
108 This is equivalent to:
109 
110  typedef vtkStreamingDemandDrivenPipeline vtkSDDP;
111  vtkNew<vtkRTAnalyticSource> source;
112  int updateExtent[6] = {0, 5, 0, 5, 2, 2};
113  source->UpdateInformation();
114  source->GetOutputInformation(0)->Set(vtkSDDP::UPDATE_EXTENT(), updateExtent, 6);
115  reader->Update();
116 
117 We expect to remove the deprecated methods in VTK 8.0.
118 
119 Derivatives
120 -----------
121 
122 VTK has a C/row-major ordering of arrays. The vtkCellDerivatives
123 filter was erroneously outputting second order tensors
124 (i.e. 9 component tuples) in Fortran/column-major ordering. This has been
125 fixed along with the numpy vector_gradient and strain functions.
126 Additionally, vtkTensors was removed as this class was only
127 used by vtkCellDerivatives and was contributing to the confusion.
128 
129 vtkSMPTools
130 -----------
131 
132 The following back-ends have been removed:
133 + Simple: This is not a production level backend and was only used for debugging purposes.
134 + Kaapi: This backend is no longer maintained.
135 
136 vtkDataArray Refactor, vtkArrayDispatch and Related Tools
137 ---------------------------------------------------------
138 
139 The `vtkDataArrayTemplate` template class has been replaced by
140 `vtkAOSDataArrayTemplate` to distinguish it from the new
141 `vtkSOADataArrayTemplate`. The former uses Array-Of-Structs component ordering
142 while the latter uses Struct-Of-Arrays component ordering. These both derive
143 from the new `vtkGenericDataArray` template class and are an initial
144 implementation of native support for alternate memory layouts in VTK.
145 
146 To facilitate working with these arrays efficiently, several new tools have
147 been added in this release. They are detailed \ref VTK-7-1-ArrayDispatch "here".
148 
149 As part of the refactoring effort, several `vtkDataArrayTemplate` methods were
150 deprecated and replaced with new, const-correct methods with more meaningful
151 names.
152 
153 The old and new method names are listed below:
154 
155 + `GetTupleValue` is now `GetTypedTuple`
156 + `SetTupleValue` is now `SetTypedTuple`
157 + `InsertTupleValue` is now `InsertTypedTuple`
158 + `InsertNextTupleValue` is now `InsertNextTypedTuple`