VMTK
Loading...
Searching...
No Matches
vtkvmtkCenterlineGeometry.cxx
Go to the documentation of this file.
1/*=========================================================================
2
3Program: VMTK
4Module: $RCSfile: vtkvmtkCenterlineGeometry.cxx,v $
5Language: C++
6Date: $Date: 2006/07/17 09:52:56 $
7Version: $Revision: 1.5 $
8
9 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
10 See LICENSE file for details.
11
12 Portions of this code are covered under the VTK copyright.
13 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
14 for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notices for more information.
19
20=========================================================================*/
21
24#include "vtkvmtkConstants.h"
25#include "vtkPolyData.h"
26#include "vtkDoubleArray.h"
27#include "vtkPointData.h"
28#include "vtkCellData.h"
29#include "vtkPolyLine.h"
30#include "vtkMath.h"
31#include "vtkTransform.h"
32#include "vtkInformation.h"
33#include "vtkInformationVector.h"
34#include "vtkObjectFactory.h"
35
36
38
40{
41 this->LengthArrayName = NULL;
42 this->CurvatureArrayName = NULL;
43 this->TorsionArrayName = NULL;
44 this->TortuosityArrayName = NULL;
45
46 this->FrenetTangentArrayName = NULL;
47 this->FrenetNormalArrayName = NULL;
48 this->FrenetBinormalArrayName = NULL;
49
50 this->LineSmoothing = 0;
51 this->OutputSmoothedLines = 0;
52 this->SmoothingFactor = 0.01;
54}
55
57{
58 if (this->LengthArrayName)
59 {
60 delete[] this->LengthArrayName;
61 this->LengthArrayName = NULL;
62 }
63
64 if (this->CurvatureArrayName)
65 {
66 delete[] this->CurvatureArrayName;
67 this->CurvatureArrayName = NULL;
68 }
69
70 if (this->TorsionArrayName)
71 {
72 delete[] this->TorsionArrayName;
73 this->TorsionArrayName = NULL;
74 }
75
76 if (this->TortuosityArrayName)
77 {
78 delete[] this->TortuosityArrayName;
79 this->TortuosityArrayName = NULL;
80 }
81
82 if (this->FrenetTangentArrayName)
83 {
84 delete[] this->FrenetTangentArrayName;
85 this->FrenetTangentArrayName = NULL;
86 }
87
88 if (this->FrenetNormalArrayName)
89 {
90 delete[] this->FrenetNormalArrayName;
91 this->FrenetNormalArrayName = NULL;
92 }
93
95 {
96 delete[] this->FrenetBinormalArrayName;
97 this->FrenetBinormalArrayName = NULL;
98 }
99}
100
102 vtkInformation *vtkNotUsed(request),
103 vtkInformationVector **inputVector,
104 vtkInformationVector *outputVector)
105{
106 // get the info objects
107 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
108 vtkInformation *outInfo = outputVector->GetInformationObject(0);
109
110 // get the input and output
111 vtkPolyData *input = vtkPolyData::SafeDownCast(
112 inInfo->Get(vtkDataObject::DATA_OBJECT()));
113 vtkPolyData *output = vtkPolyData::SafeDownCast(
114 outInfo->Get(vtkDataObject::DATA_OBJECT()));
115
116 if (!this->LengthArrayName)
117 {
118 vtkErrorMacro(<<"LengthArrayName not specified");
119 return 1;
120 }
121
122 if (!this->CurvatureArrayName)
123 {
124 vtkErrorMacro(<<"CurvatureArrayName not specified");
125 return 1;
126 }
127
128 if (!this->TorsionArrayName)
129 {
130 vtkErrorMacro(<<"TorsionArrayName not specified");
131 return 1;
132 }
133
134 if (!this->TortuosityArrayName)
135 {
136 vtkErrorMacro(<<"TorsionArrayName not specified");
137 return 1;
138 }
139
140 if (!this->FrenetTangentArrayName)
141 {
142 vtkErrorMacro(<<"FrenetTangentArrayName not specified");
143 return 1;
144 }
145
146 if (!this->FrenetNormalArrayName)
147 {
148 vtkErrorMacro(<<"FrenetNormalArrayName not specified");
149 return 1;
150 }
151
152 if (!this->FrenetBinormalArrayName)
153 {
154 vtkErrorMacro(<<"FrenetBinormalArrayName not specified");
155 return 1;
156 }
157
158 output->DeepCopy(input);
159
160 int numberOfInputPoints = input->GetNumberOfPoints();
161 int numberOfInputCells = input->GetNumberOfCells();
162
163 vtkDoubleArray* lengthArray = vtkDoubleArray::New();
164 lengthArray->SetName(this->LengthArrayName);
165 lengthArray->SetNumberOfComponents(1);
166 lengthArray->SetNumberOfTuples(numberOfInputCells);
167 lengthArray->FillComponent(0,0.0);
168
169 output->GetCellData()->AddArray(lengthArray);
170
171 vtkDoubleArray* curvatureArray = vtkDoubleArray::New();
172 curvatureArray->SetName(this->CurvatureArrayName);
173 curvatureArray->SetNumberOfComponents(1);
174 curvatureArray->SetNumberOfTuples(numberOfInputPoints);
175 curvatureArray->FillComponent(0,0.0);
176
177 output->GetPointData()->AddArray(curvatureArray);
178
179 vtkDoubleArray* torsionArray = vtkDoubleArray::New();
180 torsionArray->SetName(this->TorsionArrayName);
181 torsionArray->SetNumberOfComponents(1);
182 torsionArray->SetNumberOfTuples(numberOfInputPoints);
183 torsionArray->FillComponent(0,0.0);
184
185 output->GetPointData()->AddArray(torsionArray);
186
187 vtkDoubleArray* tortuosityArray = vtkDoubleArray::New();
188 tortuosityArray->SetName(this->TortuosityArrayName);
189 tortuosityArray->SetNumberOfComponents(1);
190 tortuosityArray->SetNumberOfTuples(numberOfInputCells);
191 tortuosityArray->FillComponent(0,0.0);
192
193 output->GetCellData()->AddArray(tortuosityArray);
194
195 vtkDoubleArray* frenetTangentArray = vtkDoubleArray::New();
196 frenetTangentArray->SetName(this->FrenetTangentArrayName);
197 frenetTangentArray->SetNumberOfComponents(3);
198 frenetTangentArray->SetNumberOfTuples(numberOfInputPoints);
199 frenetTangentArray->FillComponent(0,0.0);
200 frenetTangentArray->FillComponent(1,0.0);
201 frenetTangentArray->FillComponent(2,0.0);
202
203 output->GetPointData()->AddArray(frenetTangentArray);
204
205 vtkDoubleArray* frenetNormalArray = vtkDoubleArray::New();
206 frenetNormalArray->SetName(this->FrenetNormalArrayName);
207 frenetNormalArray->SetNumberOfComponents(3);
208 frenetNormalArray->SetNumberOfTuples(numberOfInputPoints);
209 frenetNormalArray->FillComponent(0,0.0);
210 frenetNormalArray->FillComponent(1,0.0);
211 frenetNormalArray->FillComponent(2,0.0);
212
213 output->GetPointData()->AddArray(frenetNormalArray);
214
215 vtkDoubleArray* frenetBinormalArray = vtkDoubleArray::New();
216 frenetBinormalArray->SetName(this->FrenetBinormalArrayName);
217 frenetBinormalArray->SetNumberOfComponents(3);
218 frenetBinormalArray->SetNumberOfTuples(numberOfInputPoints);
219 frenetBinormalArray->FillComponent(0,0.0);
220 frenetBinormalArray->FillComponent(1,0.0);
221 frenetBinormalArray->FillComponent(2,0.0);
222
223 output->GetPointData()->AddArray(frenetBinormalArray);
224
225 for (int i=0; i<input->GetNumberOfCells(); i++)
226 {
227 vtkCell* line = input->GetCell(i);
228 if (line->GetCellType() != VTK_LINE && line->GetCellType() != VTK_POLY_LINE)
229 {
230 continue;
231 }
232
233 vtkDoubleArray* lineCurvatureArray = vtkDoubleArray::New();
234 vtkDoubleArray* lineTorsionArray = vtkDoubleArray::New();
235 vtkDoubleArray* lineTangentArray = vtkDoubleArray::New();
236 vtkDoubleArray* lineNormalArray = vtkDoubleArray::New();
237 vtkDoubleArray* lineBinormalArray = vtkDoubleArray::New();
238
239 vtkPoints* linePoints = vtkPoints::New();
240 linePoints->DeepCopy(line->GetPoints());
241
242 if (this->LineSmoothing)
243 {
244 vtkPoints* smoothLinePoints = vtkPoints::New();
246 linePoints->DeepCopy(smoothLinePoints);
247 smoothLinePoints->Delete();
248 }
249
250 this->ComputeLineCurvature(linePoints,lineCurvatureArray);
251 this->ComputeLineTorsion(linePoints,lineTorsionArray);
252 this->ComputeLineFrenetReferenceSystem(linePoints,lineTangentArray,lineNormalArray,lineBinormalArray);
253
254 int numberOfLinePoints = linePoints->GetNumberOfPoints();
255
256 double length = 0.0;
257 double point0[3], point1[3];
258 for (int j=0; j<numberOfLinePoints; j++)
259 {
260 vtkIdType pointId = line->GetPointId(j);
261 if (this->OutputSmoothedLines)
262 {
263 output->GetPoints()->SetPoint(pointId,linePoints->GetPoint(j));
264 }
265 if (j>0)
266 {
267 linePoints->GetPoint(j-1,point0);
268 linePoints->GetPoint(j,point1);
269 length += sqrt(vtkMath::Distance2BetweenPoints(point0,point1));
270 }
271 curvatureArray->SetComponent(pointId,0,lineCurvatureArray->GetComponent(j,0));
272 torsionArray->SetComponent(pointId,0,lineTorsionArray->GetComponent(j,0));
273 double tuple[3];
274 lineTangentArray->GetTuple(j,tuple);
275 frenetTangentArray->SetTuple(pointId,tuple);
276 lineNormalArray->GetTuple(j,tuple);
277 frenetNormalArray->SetTuple(pointId,tuple);
278 lineBinormalArray->GetTuple(j,tuple);
279 frenetBinormalArray->SetTuple(pointId,tuple);
280 }
281
282 linePoints->GetPoint(0,point0);
283 linePoints->GetPoint(numberOfLinePoints-1,point1);
284 double tortuosity = length / sqrt(vtkMath::Distance2BetweenPoints(point0,point1)) - 1.0;
285
286 lengthArray->SetComponent(i,0,length);
287 tortuosityArray->SetComponent(i,0,tortuosity);
288
289 lineCurvatureArray->Delete();
290 lineTorsionArray->Delete();
291 linePoints->Delete();
292 lineTangentArray->Delete();
293 lineNormalArray->Delete();
294 lineBinormalArray->Delete();
295 }
296
297 lengthArray->Delete();
298 curvatureArray->Delete();
299 torsionArray->Delete();
300 tortuosityArray->Delete();
301 frenetTangentArray->Delete();
302 frenetNormalArray->Delete();
303 frenetBinormalArray->Delete();
304
305 return 1;
306}
307
308void vtkvmtkCenterlineGeometry::ComputeLineFrenetReferenceSystem(vtkPoints* linePoints, vtkDoubleArray* lineTangentArray, vtkDoubleArray* lineNormalArray, vtkDoubleArray* lineBinormalArray)
309{
310 int numberOfPoints = linePoints->GetNumberOfPoints();
311
312 lineTangentArray->SetNumberOfComponents(3);
313 lineTangentArray->SetNumberOfTuples(numberOfPoints);
314 lineTangentArray->FillComponent(0,0.0);
315 lineTangentArray->FillComponent(1,0.0);
316 lineTangentArray->FillComponent(2,0.0);
317
318 lineNormalArray->SetNumberOfComponents(3);
319 lineNormalArray->SetNumberOfTuples(numberOfPoints);
320 lineNormalArray->FillComponent(0,0.0);
321 lineNormalArray->FillComponent(1,0.0);
322 lineNormalArray->FillComponent(2,0.0);
323
324 lineBinormalArray->SetNumberOfComponents(3);
325 lineBinormalArray->SetNumberOfTuples(numberOfPoints);
326 lineBinormalArray->FillComponent(0,0.0);
327 lineBinormalArray->FillComponent(1,0.0);
328 lineBinormalArray->FillComponent(2,0.0);
329
330 double point0[3], point1[3], point2[3];
331 double vector0[3], vector1[3];
332
333 for (int j=1; j<numberOfPoints-1; j++)
334 {
335 linePoints->GetPoint(j-1,point0);
336 linePoints->GetPoint(j,point1);
337 linePoints->GetPoint(j+1,point2);
338
339 vector0[0] = point1[0] - point0[0];
340 vector0[1] = point1[1] - point0[1];
341 vector0[2] = point1[2] - point0[2];
342
343 vector1[0] = point2[0] - point1[0];
344 vector1[1] = point2[1] - point1[1];
345 vector1[2] = point2[2] - point1[2];
346
347 double norm0 = vtkMath::Norm(vector0);
348 double norm1 = vtkMath::Norm(vector1);
349
350 if (norm0 < VTK_VMTK_DOUBLE_TOL || norm1 < VTK_VMTK_DOUBLE_TOL)
351 {
352 continue;
353 }
354
355 double xp[3];
356 xp[0] = point2[0] - point0[0];
357 xp[1] = point2[1] - point0[1];
358 xp[2] = point2[2] - point0[2];
359 xp[0] /= norm0 + norm1;
360 xp[1] /= norm0 + norm1;
361 xp[2] /= norm0 + norm1;
362
363 double xpp[3];
364 xpp[0] = (point2[0] - point1[0]) / norm1 - (point1[0] - point0[0]) / norm0;
365 xpp[1] = (point2[1] - point1[1]) / norm1 - (point1[1] - point0[1]) / norm0;
366 xpp[2] = (point2[2] - point1[2]) / norm1 - (point1[2] - point0[2]) / norm0;
367 xpp[0] /= (norm0 + norm1) / 2.0;
368 xpp[1] /= (norm0 + norm1) / 2.0;
369 xpp[2] /= (norm0 + norm1) / 2.0;
370
371 double xpxppcross[3];
372 vtkMath::Cross(xp,xpp,xpxppcross);
373
374 double tangent[3], normal[3], binormal[3];
375
376 tangent[0] = xp[0];
377 tangent[1] = xp[1];
378 tangent[2] = xp[2];
379 vtkMath::Normalize(tangent);
380
381 binormal[0] = xpxppcross[0];
382 binormal[1] = xpxppcross[1];
383 binormal[2] = xpxppcross[2];
384 vtkMath::Normalize(binormal);
385
386 vtkMath::Cross(binormal,tangent,normal);
387 vtkMath::Normalize(normal);
388
389 lineTangentArray->SetTuple(j,tangent);
390 lineNormalArray->SetTuple(j,normal);
391 lineBinormalArray->SetTuple(j,binormal);
392 }
393
394 double tuple[3];
395 lineTangentArray->GetTuple(1,tuple);
396 lineTangentArray->SetTuple(0,tuple);
397 lineNormalArray->GetTuple(1,tuple);
398 lineNormalArray->SetTuple(0,tuple);
399 lineBinormalArray->GetTuple(1,tuple);
400 lineBinormalArray->SetTuple(0,tuple);
401 lineTangentArray->GetTuple(numberOfPoints-2,tuple);
402 lineTangentArray->SetTuple(numberOfPoints-1,tuple);
403 lineNormalArray->GetTuple(numberOfPoints-2,tuple);
404 lineNormalArray->SetTuple(numberOfPoints-1,tuple);
405 lineBinormalArray->GetTuple(numberOfPoints-2,tuple);
406 lineBinormalArray->SetTuple(numberOfPoints-1,tuple);
407}
408
409double vtkvmtkCenterlineGeometry::ComputeLineCurvature(vtkPoints* linePoints, vtkDoubleArray* curvatureArray)
410{
411 int numberOfPoints = linePoints->GetNumberOfPoints();
412
413 curvatureArray->SetNumberOfComponents(1);
414 curvatureArray->SetNumberOfTuples(numberOfPoints);
415 curvatureArray->FillComponent(0,0.0);
416
417 double point0[3], point1[3], point2[3];
418 double vector0[3], vector1[3];
419
420 double averageCurvature = 0.0;
421 double weightSum = 0.0;
422
423 for (int j=1; j<numberOfPoints-1; j++)
424 {
425 linePoints->GetPoint(j-1,point0);
426 linePoints->GetPoint(j,point1);
427 linePoints->GetPoint(j+1,point2);
428
429 vector0[0] = point1[0] - point0[0];
430 vector0[1] = point1[1] - point0[1];
431 vector0[2] = point1[2] - point0[2];
432
433 vector1[0] = point2[0] - point1[0];
434 vector1[1] = point2[1] - point1[1];
435 vector1[2] = point2[2] - point1[2];
436
437 double norm0 = vtkMath::Norm(vector0);
438 double norm1 = vtkMath::Norm(vector1);
439
440 if (norm0 < VTK_VMTK_DOUBLE_TOL || norm1 < VTK_VMTK_DOUBLE_TOL)
441 {
442 continue;
443 }
444
445 double xp[3];
446 xp[0] = point2[0] - point0[0];
447 xp[1] = point2[1] - point0[1];
448 xp[2] = point2[2] - point0[2];
449 xp[0] /= norm0 + norm1;
450 xp[1] /= norm0 + norm1;
451 xp[2] /= norm0 + norm1;
452
453 double xpp[3];
454 xpp[0] = (point2[0] - point1[0]) / norm1 - (point1[0] - point0[0]) / norm0;
455 xpp[1] = (point2[1] - point1[1]) / norm1 - (point1[1] - point0[1]) / norm0;
456 xpp[2] = (point2[2] - point1[2]) / norm1 - (point1[2] - point0[2]) / norm0;
457 xpp[0] /= (norm0 + norm1) / 2.0;
458 xpp[1] /= (norm0 + norm1) / 2.0;
459 xpp[2] /= (norm0 + norm1) / 2.0;
460
461 double xpxppcross[3];
462 vtkMath::Cross(xp,xpp,xpxppcross);
463
464 double curvature = vtkMath::Norm(xpxppcross) / pow(vtkMath::Norm(xp),3.0);
465 curvatureArray->SetComponent(j,0,curvature);
466 double weight = (norm0 + norm1) / 2.0;
467 averageCurvature += curvature * weight;
468
469 weightSum += weight;
470 }
471
472 if (weightSum>0.0)
473 {
474 averageCurvature /= weightSum;
475 }
476
477 return averageCurvature;
478}
479
480double vtkvmtkCenterlineGeometry::ComputeLineTorsion(vtkPoints* linePoints, vtkDoubleArray* torsionArray)
481{
482 int numberOfPoints = linePoints->GetNumberOfPoints();
483
484 torsionArray->SetNumberOfComponents(1);
485 torsionArray->SetNumberOfTuples(numberOfPoints);
486 torsionArray->FillComponent(0,0.0);
487
488 double point0[3], point1[3], point2[3];
489 double vector0[3], vector1[3];
490
491 double averageTorsion = 0.0;
492 double weightSum = 0.0;
493
494 double* xps = new double[3*numberOfPoints];
495 double* xpps = new double[3*numberOfPoints];
496
497 int j;
498 for (j=0; j<numberOfPoints; j++)
499 {
500 xps[3*j+0] = xps[3*j+1] = xps[3*j+2] = 0.0;
501 xpps[3*j+0] = xpps[3*j+1] = xpps[3*j+2] = 0.0;
502 }
503
504 for (j=1; j<numberOfPoints-1; j++)
505 {
506 linePoints->GetPoint(j-1,point0);
507 linePoints->GetPoint(j,point1);
508 linePoints->GetPoint(j+1,point2);
509
510 vector0[0] = point1[0] - point0[0];
511 vector0[1] = point1[1] - point0[1];
512 vector0[2] = point1[2] - point0[2];
513
514 vector1[0] = point2[0] - point1[0];
515 vector1[1] = point2[1] - point1[1];
516 vector1[2] = point2[2] - point1[2];
517
518 double norm0 = vtkMath::Norm(vector0);
519 double norm1 = vtkMath::Norm(vector1);
520
521 if (norm0 < VTK_VMTK_DOUBLE_TOL || norm1 < VTK_VMTK_DOUBLE_TOL)
522 {
523 continue;
524 }
525
526 xps[3*j+0] = point2[0] - point0[0];
527 xps[3*j+1] = point2[1] - point0[1];
528 xps[3*j+2] = point2[2] - point0[2];
529 xps[3*j+0] /= norm0 + norm1;
530 xps[3*j+1] /= norm0 + norm1;
531 xps[3*j+2] /= norm0 + norm1;
532
533 xpps[3*j+0] = (point2[0] - point1[0]) / norm1 - (point1[0] - point0[0]) / norm0;
534 xpps[3*j+1] = (point2[1] - point1[1]) / norm1 - (point1[1] - point0[1]) / norm0;
535 xpps[3*j+2] = (point2[2] - point1[2]) / norm1 - (point1[2] - point0[2]) / norm0;
536 xpps[3*j+0] /= (norm0 + norm1) / 2.0;
537 xpps[3*j+1] /= (norm0 + norm1) / 2.0;
538 xpps[3*j+2] /= (norm0 + norm1) / 2.0;
539 }
540
541 for (j=2; j<numberOfPoints-2; j++)
542 {
543 linePoints->GetPoint(j-1,point0);
544 linePoints->GetPoint(j,point1);
545 linePoints->GetPoint(j+1,point2);
546
547 vector0[0] = point1[0] - point0[0];
548 vector0[1] = point1[1] - point0[1];
549 vector0[2] = point1[2] - point0[2];
550
551 vector1[0] = point2[0] - point1[0];
552 vector1[1] = point2[1] - point1[1];
553 vector1[2] = point2[2] - point1[2];
554
555 double norm0 = vtkMath::Norm(vector0);
556 double norm1 = vtkMath::Norm(vector1);
557
558 if (norm0 < VTK_VMTK_DOUBLE_TOL || norm1 < VTK_VMTK_DOUBLE_TOL)
559 {
560 continue;
561 }
562
563 double xp[3];
564 xp[0] = xps[3*j+0];
565 xp[1] = xps[3*j+1];
566 xp[2] = xps[3*j+2];
567
568 double xpp[3];
569 xpp[0] = xpps[3*j+0];
570 xpp[1] = xpps[3*j+1];
571 xpp[2] = xpps[3*j+2];
572
573 double xpxppcross[3];
574 vtkMath::Cross(xp,xpp,xpxppcross);
575
576 double xppp[3];
577 xppp[0] = xpps[3*(j+1)+0] - xpps[3*(j-1)+0];
578 xppp[1] = xpps[3*(j+1)+1] - xpps[3*(j-1)+1];
579 xppp[2] = xpps[3*(j+1)+2] - xpps[3*(j-1)+2];
580
581 xppp[0] /= norm0 + norm1;
582 xppp[1] /= norm0 + norm1;
583 xppp[2] /= norm0 + norm1;
584
585 double xpxppcrossNorm = vtkMath::Norm(xpxppcross);
586 double torsion = (xpxppcrossNorm > 0 ? vtkMath::Dot(xpxppcross, xppp) / pow(xpxppcrossNorm, 2.0) : 0);
587
588 torsionArray->SetComponent(j,0,torsion);
589 double weight = (norm0 + norm1) / 2.0;
590 averageTorsion += torsion * weight;
591
592 weightSum += weight;
593 }
594
595 delete[] xps;
596 delete[] xpps;
597
598 if (weightSum>0.0)
599 {
600 averageTorsion /= weightSum;
601 }
602
603 return averageTorsion;
604}
605
606void vtkvmtkCenterlineGeometry::PrintSelf(std::ostream& os, vtkIndent indent)
607{
608 this->Superclass::PrintSelf(os,indent);
609}
Compute length, curvature, torsion, tortuosity, and frenet frames for individual centerlines.
static void ComputeLineFrenetReferenceSystem(vtkPoints *linePoints, vtkDoubleArray *lineTangentArray, vtkDoubleArray *lineNormalArray, vtkDoubleArray *lineBinormalArray)
static double ComputeLineTorsion(vtkPoints *linePoints, vtkDoubleArray *torsionArray)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void PrintSelf(std::ostream &os, vtkIndent indent) override
static double ComputeLineCurvature(vtkPoints *linePoints, vtkDoubleArray *curvatureArray)
static void SmoothLine(vtkPoints *linePoints, vtkPoints *smoothLinePoints, int numberOfIterations=10, double relaxation=0.1)
vtkStandardNewMacro(vtkvmtkCenterlineGeometry)
#define VTK_VMTK_DOUBLE_TOL