Skip to content

Commit e5670cb

Browse files
committed
deprecation fixes
1 parent b762544 commit e5670cb

5 files changed

Lines changed: 54 additions & 54 deletions

File tree

Common/Examples/viewer2.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int main( int argc, char *argv[] )
7272
Window->Interact();
7373

7474
vtkOBJExporter *Export=vtkOBJExporter::New();
75-
Export->SetInput(Window->GetvtkRenderWindow());
75+
Export->SetRenderWindow(Window->GetvtkRenderWindow());
7676
Export->SetFilePrefix("export");
7777
Export->Write();
7878

Common/RenderWindow.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class MyInteractorStyleTrackballCamera:public
143143
SWriter->Delete ();
144144
} else if ( key == "F8" ) {
145145
vtkOBJExporter * SWriter = vtkOBJExporter::New ();
146-
SWriter->SetInput (this->Window->GetvtkRenderWindow());
146+
SWriter->SetRenderWindow (this->Window->GetvtkRenderWindow());
147147
SWriter->SetFilePrefix ("mesh");
148148
SWriter->Write ();
149149
SWriter->Delete ();
@@ -161,7 +161,7 @@ class MyInteractorStyleTrackballCamera:public
161161
Writer->Delete ();
162162
} else if ( key == "F11" ) {
163163
vtkVRMLExporter * Writer = vtkVRMLExporter::New ();
164-
Writer->SetInput (this->Window->GetvtkRenderWindow());
164+
Writer->SetRenderWindow (this->Window->GetvtkRenderWindow());
165165
Writer->SetFileName ("mesh.wrl");
166166
Writer->Write ();
167167
Writer->Delete ();

Common/vtkOFFReader.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ int vtkOFFReader::RequestData(vtkInformation* vtkNotUsed(request),
146146
#endif
147147

148148
// allocation memoire pour les cellules que nous allons lire
149-
temp_cells->Allocate(NumberOfCells);
149+
temp_cells->AllocateExact(NumberOfCells, 3);
150150

151151
// lecture de la ligne d info : nombre d'arretes
152152
UnusedResult=fscanf( stream, "%d", &buffer );

Common/vtkSurfaceBase.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ void vtkSurfaceBase::Init(int numPoints, int numFaces, int numEdges)
13711371
#if ( (VTK_MAJOR_VERSION < 9))
13721372
CellsArray1->Allocate(4*numFaces,numFaces);
13731373
#else
1374-
CellsArray1->Allocate(3*numFaces,numFaces);
1374+
CellsArray1->AllocateExact(3*numFaces,numFaces);
13751375
#endif
13761376
this->SetPolys(CellsArray1);
13771377
CellsArray1->Delete();

Common/vtkSurfaceBase.h

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55
Language: C++
66
Date: 2002/05
77
Auteur: Sebastien VALETTE
8-
8+
99
=========================================================================*/
1010

1111
/* ---------------------------------------------------------------------
1212
1313
* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
1414
* Author : Sebastien Valette
1515
*
16-
* This software is governed by the CeCILL-B license under French law and
17-
* abiding by the rules of distribution of free software. You can use,
18-
* modify and/ or redistribute the software under the terms of the CeCILL-B
19-
* license as circulated by CEA, CNRS and INRIA at the following URL
20-
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
16+
* This software is governed by the CeCILL-B license under French law and
17+
* abiding by the rules of distribution of free software. You can use,
18+
* modify and/ or redistribute the software under the terms of the CeCILL-B
19+
* license as circulated by CEA, CNRS and INRIA at the following URL
20+
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
2121
* or in the file LICENSE.txt.
2222
*
2323
* As a counterpart to the access to the source code and rights to copy,
2424
* modify and redistribute granted by the license, users are provided only
2525
* with a limited warranty and the software's author, the holder of the
2626
* economic rights, and the successive licensors have only limited
27-
* liability.
27+
* liability.
2828
*
2929
* The fact that you are presently reading this means that you have had
3030
* knowledge of the CeCILL-B license and that you accept its terms.
31-
* ------------------------------------------------------------------------ */
31+
* ------------------------------------------------------------------------ */
3232

3333
#ifndef __vtkSurfaceBase_h
3434
#define __vtkSurfaceBase_h
@@ -39,7 +39,7 @@
3939
#include <vtkIntArray.h>
4040
#include <vtkIdTypeArray.h>
4141
#include <vtkBitArray.h>
42-
#include <vtkPolyData.h>
42+
#include <vtkPolyData.h>
4343
#include <vtkCell.h>
4444
#include <vtkCommand.h>
4545
#include <vtkCellArray.h>
@@ -66,18 +66,18 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
6666
/// The Constructor vtkSurfaceBase::New();
6767
static vtkSurfaceBase *New();
6868
vtkTypeMacro(vtkSurfaceBase,vtkPolyData);
69-
69+
7070
/// Create a similar type object.
7171
vtkDataObject *MakeObject()
7272
{return vtkSurfaceBase::New();};
73-
73+
7474
/// Embeds a vtkPolyData into a vtkSurfaceBase object.
7575
void CreateFromPolyData(vtkPolyData *input);
76-
76+
7777
/// Set memory allocation in the vtkSurfaceBase object for further Cells
7878
/// and points insertion (this is not mandatory, and maybe useless)
7979
void Init (int numPoints, int numFaces, int numEdges);
80-
80+
8181
/// Set memory allocation in the vtkSurfaceBase object, which is assumed to
8282
/// be as large as the *mesh vtkSurfaceBase
8383
void Init (vtkSurfaceBase *mesh);
@@ -102,7 +102,7 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
102102

103103
/// Flips the edge. If the flip was performed, return -1. Otherwise, the edge already existing is returned.
104104
vtkIdType FlipEdge(vtkIdType edge);
105-
105+
106106
/// Flips the edge. If the resulting edge already exists, it is flipped (an so on). Returns -1 in case of success
107107
vtkIdType FlipEdgeSure(vtkIdType edge);
108108

@@ -112,7 +112,7 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
112112
/// Call this function if you want the surface to be oriented.
113113
/// By default, the surface is oriented.
114114
void SetOrientationOn();
115-
115+
116116
/// Call this function if you do not want the surface to be oriented.
117117
/// By default, the surface is oriented.
118118
void SetOrientationOff();
@@ -156,59 +156,59 @@ class VTK_EXPORT vtkSurfaceBase : public vtkPolyData
156156

157157
/// Returns the number of edges in the vtkSurfaceBase Object
158158
int GetNumberOfEdges() {return this->Edges.size();};
159-
160-
/// Returns v1 and v2 as the vertices bounding the edge
159+
160+
/// Returns v1 and v2 as the vertices bounding the edge
161161
void GetEdgeVertices(const vtkIdType& edge, vtkIdType &v1, vtkIdType &v2);
162162

163163
// returns the number of faces adjacvent to the input edge
164164
int GetEdgeNumberOfAdjacentFaces(const vtkIdType &e);
165-
165+
166166
/// Returns the vertices v1, v2 and v3 bounding the face
167167
void GetFaceVertices(const vtkIdType& face,
168168
vtkIdType &v1, vtkIdType &v2, vtkIdType &v3);
169169

170-
/// Returns the number of vertices and a pointer to them for the face
170+
/// Returns the number of vertices and a pointer to them for the face
171171
void GetFaceVertices(const vtkIdType& face, vtkIdType &NumberOfVertices,
172172
vtkIdType* &Vertices);
173-
173+
174174
/// Returns the coordinates of Point
175175
void GetPointCoordinates(vtkIdType Point, double *x);
176-
176+
177177
/// Returns the valence of the Point V1 i.e. its number of adjacent Points
178178
int GetValence(const vtkIdType& v1);
179-
179+
180180
/// Returns the number of boundaries at Point v1
181181
int GetNumberOfBoundaries(const vtkIdType &v1);
182-
183-
/// Conquer from a triangle f1 through the edge bounded by v1 and v2.
184-
/// f2 is the conquered triangle and v3 its third vertex
182+
183+
/// Conquer from a triangle f1 through the edge bounded by v1 and v2.
184+
/// f2 is the conquered triangle and v3 its third vertex
185185
/// (v1 and v2 are the first and second vertices)
186186
void Conquer(const vtkIdType& f1,const vtkIdType& v1, const vtkIdType& v2,
187187
vtkIdType &f2, vtkIdType &v3);
188-
188+
189189
/// Returns f1 and f2 as the faces adjacent to the edge.
190190
/// WARNING : if the edge is a boundary edge, f2=-1 (it has only
191191
/// 1 adjacent face)
192192
void GetEdgeFaces(const vtkIdType& e1, vtkIdType &f1, vtkIdType &f2);
193193

194194
/// Returns the faces adjacent to the edge as an IdList
195195
void GetEdgeFaces(vtkIdType e1, vtkIdList *Flist);
196-
196+
197197
/// Returns true if the edge is a Manifold one (2 adjacent polygons)
198198
bool IsEdgeManifold(const vtkIdType& e);
199199

200200
/// returns true if the vertex is manifold.
201201
bool IsVertexManifold( const vtkIdType& iV);
202-
203-
/// Returns the List of Points adjacent to the point v1
202+
203+
/// Returns the List of Points adjacent to the point v1
204204
void GetVertexNeighbours(vtkIdType v1, vtkIdList *Output);
205-
206-
/// Returns the List of Faces adjacent to the Face
205+
206+
/// Returns the List of Faces adjacent to the Face
207207
void GetFaceNeighbours(vtkIdType Face,vtkIdList *FList);
208208

209-
/// Returns the List of Faces adjacent to the Face
209+
/// Returns the List of Faces adjacent to the Face
210210
void GetFaceNeighbours(vtkIdType Face,vtkIdListCollection *FList);
211-
211+
212212
/// Returns the list of edges adjacent to the point v1
213213
void GetVertexNeighbourEdges(vtkIdType v1, vtkIdList *Output);
214214

@@ -220,53 +220,53 @@ vtkIdType* &Edges);
220220

221221
/// Returns the list of faces adjacent to the point v1
222222
void GetVertexNeighbourFaces(const vtkIdType &v1, vtkIdList *Output);
223-
223+
224224
/// Returns the list of vertices adjacent to the list of vertices *Input.
225225
/// Usefull for constructing n-rings
226226
void GetNeighbours(vtkIdList *Input, vtkIdList *Output);
227-
227+
228228
/// Returns the Id of the face having v1, v2 and v3 for vertices.
229229
/// Returns -1 if the face doesn't exist.
230230
vtkIdType IsFace(const vtkIdType &v1, const vtkIdType &v2, const vtkIdType &v3);
231-
231+
232232
/// Returns the Id of the edge (v1,v2).
233233
/// Returns -1 if the edge doesn't exist.
234234
vtkIdType IsEdge(const vtkIdType &v1, const vtkIdType &v2);
235-
235+
236236
/// Returns the Id of the edge between the faces f1 and f2
237237
/// Returns -1 if the edge doesn't exist
238238
vtkIdType IsEdgeBetweenFaces(const vtkIdType &f1, const vtkIdType &f2);
239-
240-
/// Returns the third Point of the face f1 (the two first Points are v1 and v2)
239+
240+
/// Returns the third Point of the face f1 (the two first Points are v1 and v2)
241241
vtkIdType GetThirdPoint(const vtkIdType& f1,const vtkIdType& v1,const vtkIdType& v2);
242-
242+
243243
/// Sets the coordinates of Point
244244
void SetPointCoordinates(const vtkIdType &Point, double *x);
245245

246246
/// Returns the first edge in the ring of v1
247247
vtkIdType GetFirstEdge(const vtkIdType& v1);
248-
248+
249249
/// Returns a boundary edge in the ring of v1. If there is no boundary edge, any given edge is returned
250250
vtkIdType GetBoundaryEdge(const vtkIdType& v1);
251251

252252
/// Returns the entropy of the valences of the mesh
253253
double GetValenceEntropy();
254-
254+
255255
/// writes a text file containing an histogram of the vertices valence distribution
256256
void GetValenceTab(char *FileName);
257257

258258
/// switches the cells orientation (usefull when the mesh is displayed all black...)
259259
void SwitchOrientation();
260-
260+
261261
/// returns 1 if Vertex is actually used to store a polygon (not deleted). Returns 0 otherwise
262262
int IsVertexActive(const vtkIdType &Vertex) {return (this->ActiveVertices->GetValue(Vertex));};
263263

264264
/// returns 1 if Face is actually used to store a polygon (not deleted). Returns 0 otherwise
265265
int IsFaceActive(const vtkIdType &Face) {return (this->ActivePolygons->GetValue(Face));};
266266

267-
/// returns 1 if Edge is actually used to store an edge (not deleted). Returns 0 otherwise
267+
/// returns 1 if Edge is actually used to store an edge (not deleted). Returns 0 otherwise
268268
int IsEdgeActive(const vtkIdType &e) {return this->Edges[e].Active;};
269-
269+
270270
/// Checks the integrity of the structure. Returns true if the structure is OK
271271
bool CheckStructure();
272272

@@ -276,7 +276,7 @@ vtkIdType* &Edges);
276276
protected:
277277

278278
/// the constructor
279-
vtkSurfaceBase();
279+
vtkSurfaceBase();
280280

281281
/// the desctructor
282282
~vtkSurfaceBase();
@@ -453,8 +453,8 @@ vtkIdType &NumberOfVertices, vtkIdType* &Vertices)
453453
inline void vtkSurfaceBase::GetFaceVertices(const vtkIdType& face,
454454
vtkIdType &NumberOfVertices, vtkIdType* &Vertices)
455455
{
456-
auto connectivity = this->Polys->GetConnectivityArray64();
457-
auto offsets = this->Polys->GetOffsetsArray64();
456+
auto connectivity = this->Polys->GetConnectivityAOSArray64();
457+
auto offsets = this->Polys->GetOffsetsAOSArray64();
458458
auto offset1 = offsets->GetValue( face );
459459
auto offset2 = offsets->GetValue( face + 1 );
460460
NumberOfVertices = offset2 - offset1;
@@ -505,7 +505,7 @@ inline void vtkSurfaceBase::GetPointCoordinates(vtkIdType Point, double *x)
505505
this->Points->GetPoint(Point,x);
506506
}
507507

508-
inline void vtkSurfaceBase::GetEdgeFaces(const vtkIdType& e1, vtkIdType &f1, vtkIdType &f2)
508+
inline void vtkSurfaceBase::GetEdgeFaces(const vtkIdType& e1, vtkIdType &f1, vtkIdType &f2)
509509
{
510510
Edge &e = Edges[ e1 ];
511511
f1=e.Poly1;

0 commit comments

Comments
 (0)