VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataCenterlineGroupsClipper Class Reference

Split a surface into groups/branches corresponding to their proximity to the polyball line of a branched centerline. More...

#include <vtkvmtkPolyDataCenterlineGroupsClipper.h>

Inheritance diagram for vtkvmtkPolyDataCenterlineGroupsClipper:
[legend]
Collaboration diagram for vtkvmtkPolyDataCenterlineGroupsClipper:
[legend]

Public Types

typedef vtkPolyDataAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkPolyDataCenterlineGroupsClipper * NewInstance () const
void PrintSelf (std::ostream &os, vtkIndent indent) override
vtkPolyData * GetClippedOutput ()
virtual void SetCenterlines (vtkPolyData *)
virtual vtkPolyData * GetCenterlines ()
virtual void SetCenterlineGroupIds (vtkIdList *)
virtual vtkIdList * GetCenterlineGroupIds ()
virtual void SetCenterlineGroupIdsArrayName (const char *)
virtual char * GetCenterlineGroupIdsArrayName ()
virtual void SetCenterlineRadiusArrayName (const char *)
virtual char * GetCenterlineRadiusArrayName ()
virtual void SetGroupIdsArrayName (const char *)
virtual char * GetGroupIdsArrayName ()
virtual void SetBlankingArrayName (const char *)
virtual char * GetBlankingArrayName ()
virtual void SetClipAllCenterlineGroupIds (int)
virtual int GetClipAllCenterlineGroupIds ()
virtual void ClipAllCenterlineGroupIdsOn ()
virtual void ClipAllCenterlineGroupIdsOff ()
virtual void SetGenerateClippedOutput (int)
virtual int GetGenerateClippedOutput ()
virtual void GenerateClippedOutputOn ()
virtual void GenerateClippedOutputOff ()
virtual void SetCutoffRadiusFactor (double)
virtual double GetCutoffRadiusFactor ()
virtual void SetClipValue (double)
virtual double GetClipValue ()
virtual void SetUseRadiusInformation (int)
virtual int GetUseRadiusInformation ()
virtual void UseRadiusInformationOn ()
virtual void UseRadiusInformationOff ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkvmtkPolyDataCenterlineGroupsClipper * SafeDownCast (vtkObjectBase *o)
static vtkvmtkPolyDataCenterlineGroupsClipper * New ()

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkPolyDataCenterlineGroupsClipper ()
 ~vtkvmtkPolyDataCenterlineGroupsClipper ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override

Protected Attributes

vtkPolyData * Centerlines
vtkIdList * CenterlineGroupIds
char * CenterlineGroupIdsArrayName
char * CenterlineRadiusArrayName
char * GroupIdsArrayName
char * BlankingArrayName
int ClipAllCenterlineGroupIds
double CutoffRadiusFactor
double ClipValue
int GenerateClippedOutput
int UseRadiusInformation

Detailed Description

Split a surface into groups/branches corresponding to their proximity to the polyball line of a branched centerline.

For each surface point, evaluates which branch group's polyball-line tube function (see vtkvmtkPolyBallLine) it is closest to, using this as an implicit clipping function to cut the surface along the boundaries between branches. This is the geometric core of the surface-side branch-splitting step (see vmtkbranchclipper / vmtkendpointextractor pype scripts), the surface counterpart to vtkvmtkCenterlineSplittingAndGroupingFilter which splits the centerlines themselves. This is the filter behind the vmtkbranchclipper pype script.

See also
vtkvmtkPolyBallLine, vtkvmtkCenterlineSplittingAndGroupingFilter

Definition at line 42 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkPolyDataCenterlineGroupsClipper()

vtkvmtkPolyDataCenterlineGroupsClipper::vtkvmtkPolyDataCenterlineGroupsClipper ( )
protected

Definition at line 42 of file vtkvmtkPolyDataCenterlineGroupsClipper.cxx.

43{
44 this->Centerlines = NULL;
45 this->CenterlineGroupIdsArrayName = NULL;
46 this->CenterlineRadiusArrayName = NULL;
47 this->GroupIdsArrayName = NULL;
48 this->BlankingArrayName = NULL;
49 this->CenterlineGroupIds = NULL;
52 this->ClipValue = 0.0;
53 this->UseRadiusInformation = 1;
54
55 this->SetNumberOfOutputPorts(2);
56 this->GenerateClippedOutput = 0;
57 vtkPolyData *output2 = vtkPolyData::New();
58 this->GetExecutive()->SetOutputData(1, output2);
59 output2->Delete();
60}
#define VTK_VMTK_LARGE_DOUBLE

◆ ~vtkvmtkPolyDataCenterlineGroupsClipper()

vtkvmtkPolyDataCenterlineGroupsClipper::~vtkvmtkPolyDataCenterlineGroupsClipper ( )
protected

Definition at line 62 of file vtkvmtkPolyDataCenterlineGroupsClipper.cxx.

63{
64 if (this->Centerlines)
65 {
66 this->Centerlines->Delete();
67 this->Centerlines = NULL;
68 }
69
70 if (this->CenterlineGroupIds)
71 {
72 this->CenterlineGroupIds->Delete();
73 this->CenterlineGroupIds = NULL;
74 }
75
77 {
78 delete[] this->CenterlineGroupIdsArrayName;
79 this->CenterlineGroupIdsArrayName = NULL;
80 }
81
83 {
84 delete[] this->CenterlineRadiusArrayName;
85 this->CenterlineRadiusArrayName = NULL;
86 }
87
88 if (this->GroupIdsArrayName)
89 {
90 delete[] this->GroupIdsArrayName;
91 this->GroupIdsArrayName = NULL;
92 }
93
94 if (this->BlankingArrayName)
95 {
96 delete[] this->BlankingArrayName;
97 this->BlankingArrayName = NULL;
98 }
99}

Member Function Documentation

◆ IsTypeOf()

int vtkvmtkPolyDataCenterlineGroupsClipper::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkPolyDataCenterlineGroupsClipper::IsA ( const char * type)
virtual

◆ SafeDownCast()

vtkvmtkPolyDataCenterlineGroupsClipper * vtkvmtkPolyDataCenterlineGroupsClipper::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkPolyDataCenterlineGroupsClipper::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkvmtkPolyDataCenterlineGroupsClipper * vtkvmtkPolyDataCenterlineGroupsClipper::NewInstance ( ) const

◆ PrintSelf()

void vtkvmtkPolyDataCenterlineGroupsClipper::PrintSelf ( std::ostream & os,
vtkIndent indent )
override

Definition at line 362 of file vtkvmtkPolyDataCenterlineGroupsClipper.cxx.

363{
364 this->Superclass::PrintSelf(os,indent);
365}

◆ New()

vtkvmtkPolyDataCenterlineGroupsClipper * vtkvmtkPolyDataCenterlineGroupsClipper::New ( )
static

◆ SetCenterlines()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetCenterlines ( vtkPolyData * )
virtual

Set/Get the split, grouped centerlines used to define the clipping. Required input.

◆ GetCenterlines()

virtual vtkPolyData * vtkvmtkPolyDataCenterlineGroupsClipper::GetCenterlines ( )
virtual

Set/Get the split, grouped centerlines used to define the clipping. Required input.

◆ SetCenterlineGroupIds()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetCenterlineGroupIds ( vtkIdList * )
virtual

Set/Get the subset of centerline group ids to clip the surface against. If not set (default, NULL), all group ids present in Centerlines are used (unless ClipAllCenterlineGroupIds restricts further).

◆ GetCenterlineGroupIds()

virtual vtkIdList * vtkvmtkPolyDataCenterlineGroupsClipper::GetCenterlineGroupIds ( )
virtual

Set/Get the subset of centerline group ids to clip the surface against. If not set (default, NULL), all group ids present in Centerlines are used (unless ClipAllCenterlineGroupIds restricts further).

◆ SetCenterlineGroupIdsArrayName()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetCenterlineGroupIdsArrayName ( const char * )
virtual

Set/Get the name of the cell data array of Centerlines holding the branch group id of each cell. Required input. Commonly named "GroupIds".

◆ GetCenterlineGroupIdsArrayName()

virtual char * vtkvmtkPolyDataCenterlineGroupsClipper::GetCenterlineGroupIdsArrayName ( )
virtual

Set/Get the name of the cell data array of Centerlines holding the branch group id of each cell. Required input. Commonly named "GroupIds".

◆ SetCenterlineRadiusArrayName()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetCenterlineRadiusArrayName ( const char * )
virtual

Set/Get the name of the point data array of Centerlines holding the maximum inscribed sphere radius at each point. Used when UseRadiusInformation is on. Commonly named "MaximumInscribedSphereRadius".

◆ GetCenterlineRadiusArrayName()

virtual char * vtkvmtkPolyDataCenterlineGroupsClipper::GetCenterlineRadiusArrayName ( )
virtual

Set/Get the name of the point data array of Centerlines holding the maximum inscribed sphere radius at each point. Used when UseRadiusInformation is on. Commonly named "MaximumInscribedSphereRadius".

◆ SetGroupIdsArrayName()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetGroupIdsArrayName ( const char * )
virtual

Set/Get the name of the output cell data array where the group id assigned to each surface cell is stored. Commonly named "GroupIds".

◆ GetGroupIdsArrayName()

virtual char * vtkvmtkPolyDataCenterlineGroupsClipper::GetGroupIdsArrayName ( )
virtual

Set/Get the name of the output cell data array where the group id assigned to each surface cell is stored. Commonly named "GroupIds".

◆ SetBlankingArrayName()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetBlankingArrayName ( const char * )
virtual

Set/Get the name of the cell data array of Centerlines holding, for each cell, whether it is a "blanked" (redundant, overlapping) tract – blanked tracts are excluded when building the per-group polyball clipping functions. Commonly named "Blanking".

◆ GetBlankingArrayName()

virtual char * vtkvmtkPolyDataCenterlineGroupsClipper::GetBlankingArrayName ( )
virtual

Set/Get the name of the cell data array of Centerlines holding, for each cell, whether it is a "blanked" (redundant, overlapping) tract – blanked tracts are excluded when building the per-group polyball clipping functions. Commonly named "Blanking".

◆ SetClipAllCenterlineGroupIds()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetClipAllCenterlineGroupIds ( int )
virtual

Toggle clipping against every centerline group id present in Centerlines, ignoring CenterlineGroupIds. Default: off.

◆ GetClipAllCenterlineGroupIds()

virtual int vtkvmtkPolyDataCenterlineGroupsClipper::GetClipAllCenterlineGroupIds ( )
virtual

Toggle clipping against every centerline group id present in Centerlines, ignoring CenterlineGroupIds. Default: off.

◆ ClipAllCenterlineGroupIdsOn()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::ClipAllCenterlineGroupIdsOn ( )
virtual

Toggle clipping against every centerline group id present in Centerlines, ignoring CenterlineGroupIds. Default: off.

◆ ClipAllCenterlineGroupIdsOff()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::ClipAllCenterlineGroupIdsOff ( )
virtual

Toggle clipping against every centerline group id present in Centerlines, ignoring CenterlineGroupIds. Default: off.

◆ SetGenerateClippedOutput()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetGenerateClippedOutput ( int )
virtual

Toggle generating a second output containing the complementary (clipped-away) part of the surface, retrievable with GetClippedOutput(). Default: off.

◆ GetGenerateClippedOutput()

virtual int vtkvmtkPolyDataCenterlineGroupsClipper::GetGenerateClippedOutput ( )
virtual

Toggle generating a second output containing the complementary (clipped-away) part of the surface, retrievable with GetClippedOutput(). Default: off.

◆ GenerateClippedOutputOn()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::GenerateClippedOutputOn ( )
virtual

Toggle generating a second output containing the complementary (clipped-away) part of the surface, retrievable with GetClippedOutput(). Default: off.

◆ GenerateClippedOutputOff()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::GenerateClippedOutputOff ( )
virtual

Toggle generating a second output containing the complementary (clipped-away) part of the surface, retrievable with GetClippedOutput(). Default: off.

◆ GetClippedOutput()

vtkPolyData * vtkvmtkPolyDataCenterlineGroupsClipper::GetClippedOutput ( )

Get the complementary (clipped-away) surface produced when GenerateClippedOutput is on.

Definition at line 101 of file vtkvmtkPolyDataCenterlineGroupsClipper.cxx.

102{
103 if (this->GetNumberOfOutputPorts() < 2)
104 {
105 return NULL;
106 }
107
108 return vtkPolyData::SafeDownCast(this->GetExecutive()->GetOutputData(1));
109}

◆ SetCutoffRadiusFactor()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetCutoffRadiusFactor ( double )
virtual

Set/Get a cutoff distance, expressed as a multiple of the local maximum inscribed sphere radius, beyond which a surface point is not considered close to a branch's polyball function. Default: a very large value (effectively unbounded).

◆ GetCutoffRadiusFactor()

virtual double vtkvmtkPolyDataCenterlineGroupsClipper::GetCutoffRadiusFactor ( )
virtual

Set/Get a cutoff distance, expressed as a multiple of the local maximum inscribed sphere radius, beyond which a surface point is not considered close to a branch's polyball function. Default: a very large value (effectively unbounded).

◆ SetClipValue()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetClipValue ( double )
virtual

Set/Get the implicit-function value at which the surface is clipped against each branch's polyball function. Default: 0.0.

◆ GetClipValue()

virtual double vtkvmtkPolyDataCenterlineGroupsClipper::GetClipValue ( )
virtual

Set/Get the implicit-function value at which the surface is clipped against each branch's polyball function. Default: 0.0.

◆ SetUseRadiusInformation()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::SetUseRadiusInformation ( int )
virtual

Toggle using the per-point sphere radii (CenterlineRadiusArrayName) when evaluating each branch's polyball clipping function, so that the tube function's true tapered shape is used rather than a plain distance-to-centerline test. Default: on.

◆ GetUseRadiusInformation()

virtual int vtkvmtkPolyDataCenterlineGroupsClipper::GetUseRadiusInformation ( )
virtual

Toggle using the per-point sphere radii (CenterlineRadiusArrayName) when evaluating each branch's polyball clipping function, so that the tube function's true tapered shape is used rather than a plain distance-to-centerline test. Default: on.

◆ UseRadiusInformationOn()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::UseRadiusInformationOn ( )
virtual

Toggle using the per-point sphere radii (CenterlineRadiusArrayName) when evaluating each branch's polyball clipping function, so that the tube function's true tapered shape is used rather than a plain distance-to-centerline test. Default: on.

◆ UseRadiusInformationOff()

virtual void vtkvmtkPolyDataCenterlineGroupsClipper::UseRadiusInformationOff ( )
virtual

Toggle using the per-point sphere radii (CenterlineRadiusArrayName) when evaluating each branch's polyball clipping function, so that the tube function's true tapered shape is used rather than a plain distance-to-centerline test. Default: on.

◆ RequestData()

int vtkvmtkPolyDataCenterlineGroupsClipper::RequestData ( vtkInformation * ,
vtkInformationVector ** ,
vtkInformationVector *  )
overrideprotectedvirtual

Definition at line 111 of file vtkvmtkPolyDataCenterlineGroupsClipper.cxx.

115{
116 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
117 vtkInformation *outInfo = outputVector->GetInformationObject(0);
118
119 vtkPolyData *input = vtkPolyData::SafeDownCast(
120 inInfo->Get(vtkDataObject::DATA_OBJECT()));
121 vtkPolyData *output = vtkPolyData::SafeDownCast(
122 outInfo->Get(vtkDataObject::DATA_OBJECT()));
123
124 vtkDataArray* centerlineGroupIdsArray;
125 vtkIntArray* blankingArray;
126 vtkIntArray* groupIdsArray;
127
128 if (!this->Centerlines)
129 {
130 vtkErrorMacro(<< "Centerlines not set.");
131 return 1;
132 }
133
135 {
136 vtkErrorMacro(<< "CenterlineGroupIds not set.");
137 return 1;
138 }
139
141 {
142 vtkErrorMacro(<< "CenterlineGroupIdsArrayName not set.");
143 return 1;
144 }
145
146 if (!this->GroupIdsArrayName)
147 {
148 vtkErrorMacro(<< "GroupIdsArrayName not set.");
149 return 1;
150 }
151
152 centerlineGroupIdsArray = this->Centerlines->GetCellData()->GetArray(this->CenterlineGroupIdsArrayName);
153
154 if (!centerlineGroupIdsArray)
155 {
156 vtkErrorMacro(<< "CenterlineGroupIdsArray with name specified does not exist");
157 return 1;
158 }
159
160 if (!this->BlankingArrayName)
161 {
162 vtkErrorMacro(<< "BlankingArrayName not set.");
163 return 1;
164 }
165
166 blankingArray = vtkIntArray::SafeDownCast(this->Centerlines->GetCellData()->GetArray(this->BlankingArrayName));
167
168 if (!blankingArray)
169 {
170 vtkErrorMacro(<< "BlankingArrayName with name specified does not exist");
171 return 1;
172 }
173
174 if (!this->CenterlineRadiusArrayName)
175 {
176 vtkErrorMacro(<< "CenterlineRadiusArrayName not set.");
177 return 1;
178 }
179
180 if (!this->Centerlines->GetPointData()->GetArray(this->CenterlineRadiusArrayName))
181 {
182 vtkErrorMacro(<< "CenterlineRadiusArray with name specified does not exist");
183 return 1;
184 }
185
186 if (this->Centerlines->GetNumberOfCells() == 1)
187 {
188 output->DeepCopy(input);
189 groupIdsArray = vtkIntArray::New();
190 groupIdsArray->SetName(this->GroupIdsArrayName);
191 groupIdsArray->SetNumberOfTuples(output->GetNumberOfPoints());
192 groupIdsArray->FillComponent(0,centerlineGroupIdsArray->GetComponent(0,0));
193 output->GetPointData()->AddArray(groupIdsArray);
194 groupIdsArray->Delete();
195 return 1;
196 }
197
198 vtkAppendPolyData* appendBranches = vtkAppendPolyData::New();
199 vtkAppendPolyData* appendClippedOutput = NULL;
200 if (this->GenerateClippedOutput)
201 {
202 appendClippedOutput = vtkAppendPolyData::New();
203 }
204
205 // for each group, compute the clipping array, clip, add group ids array and append.
206
207 vtkvmtkPolyBallLine* groupTubes = vtkvmtkPolyBallLine::New();
208 groupTubes->SetInput(this->Centerlines);
211
212 vtkvmtkPolyBallLine* nonGroupTubes = vtkvmtkPolyBallLine::New();
213 nonGroupTubes->SetInput(this->Centerlines);
215 nonGroupTubes->SetUseRadiusInformation(this->UseRadiusInformation);
216
217 int numberOfPoints = input->GetNumberOfPoints();
218
219 const char clippingArrayName[] = "ClippingArray";
220
221 vtkDoubleArray* clippingArray = vtkDoubleArray::New();
222 clippingArray->SetNumberOfComponents(1);
223 clippingArray->SetNumberOfTuples(numberOfPoints);
224 clippingArray->FillComponent(0,0.0);
225 clippingArray->SetName(clippingArrayName);
226
227 vtkPolyData* clippingInput = vtkPolyData::New();
228 clippingInput->DeepCopy(input);
229 clippingInput->GetPointData()->AddArray(clippingArray);
230 clippingInput->GetPointData()->SetActiveScalars(clippingArrayName);
231
232 vtkIdList* groupTubesGroupIds = vtkIdList::New();
233 vtkIdList* nonGroupTubesGroupIds = vtkIdList::New();
234
235 double point[3];
236 double groupTubeValue, nonGroupTubeValue, tubeDifferenceValue;
237
238 vtkIdType groupId;
239
240 vtkIdList* centerlineGroupIds = vtkIdList::New();
241
242 int i;
244 {
245 for (i=0; i<centerlineGroupIdsArray->GetNumberOfTuples(); i++)
246 {
247 if (blankingArray->GetValue(i) == 1)
248 {
249 continue;
250 }
251 centerlineGroupIds->InsertUniqueId(static_cast<vtkIdType>(vtkMath::Round(centerlineGroupIdsArray->GetComponent(i,0))));
252 }
253 }
254 else
255 {
256 centerlineGroupIds->DeepCopy(this->CenterlineGroupIds);
257 }
258
259 for (i=0; i<centerlineGroupIds->GetNumberOfIds(); i++)
260 {
261 groupId = centerlineGroupIds->GetId(i);
262
263 groupTubesGroupIds->Initialize();
264 nonGroupTubesGroupIds->Initialize();
265
266 for (int j=0; j<this->Centerlines->GetNumberOfCells(); j++)
267 {
268 if (blankingArray->GetValue(j) == 1)
269 {
270 continue;
271 }
272 if (static_cast<vtkIdType>(vtkMath::Round(centerlineGroupIdsArray->GetComponent(j,0))) == groupId)
273 {
274 groupTubesGroupIds->InsertNextId(j);
275 }
276 else
277 {
278 nonGroupTubesGroupIds->InsertNextId(j);
279 }
280 }
281
282 if ((groupTubesGroupIds->GetNumberOfIds() == 0) || (nonGroupTubesGroupIds->GetNumberOfIds() == 0))
283 {
284 continue;
285 }
286
287 groupTubes->SetInputCellIds(groupTubesGroupIds);
288 nonGroupTubes->SetInputCellIds(nonGroupTubesGroupIds);
289
290 for (int k=0; k<numberOfPoints; k++)
291 {
292 input->GetPoint(k,point);
293 groupTubeValue = groupTubes->EvaluateFunction(point);
294 if (groupTubeValue > this->CutoffRadiusFactor * this->CutoffRadiusFactor - 1)
295 {
296 groupTubeValue = VTK_VMTK_LARGE_DOUBLE;
297 }
298 nonGroupTubeValue = nonGroupTubes->EvaluateFunction(point);
299 tubeDifferenceValue = nonGroupTubeValue - groupTubeValue;
300 clippingArray->SetValue(k,tubeDifferenceValue);
301 }
302
303 vtkClipPolyData* clipper = vtkClipPolyData::New();
304 clipper->SetInputData(clippingInput);
305 clipper->SetValue(this->ClipValue);
306 clipper->GenerateClipScalarsOff();
307 clipper->SetGenerateClippedOutput(this->GenerateClippedOutput);
308 clipper->Update();
309
310 if (clipper->GetOutput()->GetNumberOfPoints()==0)
311 {
312 clipper->Delete();
313 continue;
314 }
315
316 vtkPolyData* clippedBranch = vtkPolyData::New();
317 clippedBranch->DeepCopy(clipper->GetOutput());
318
319 if (this->GenerateClippedOutput)
320 {
321 vtkPolyData* clippedOutputBranch = vtkPolyData::New();
322 clippedOutputBranch->DeepCopy(clipper->GetClippedOutput());
323 appendClippedOutput->AddInputData(clippedOutputBranch);
324 clippedOutputBranch->Delete();
325 }
326
327 groupIdsArray = vtkIntArray::New();
328 groupIdsArray->SetName(this->GroupIdsArrayName);
329 groupIdsArray->SetNumberOfTuples(clippedBranch->GetNumberOfPoints());
330 groupIdsArray->FillComponent(0,groupId);
331
332 clippedBranch->GetPointData()->AddArray(groupIdsArray);
333 appendBranches->AddInputData(clippedBranch);
334 groupIdsArray->Delete();
335 clippedBranch->Delete();
336 clipper->Delete();
337 }
338
339 appendBranches->Update();
340
341 output->DeepCopy(appendBranches->GetOutput());
342
343 if (this->GenerateClippedOutput)
344 {
345 appendClippedOutput->Update();
346 this->GetClippedOutput()->DeepCopy(appendClippedOutput->GetOutput());
347 appendClippedOutput->Delete();
348 }
349
350 clippingArray->Delete();
351 clippingInput->Delete();
352 appendBranches->Delete();
353 groupTubes->Delete();
354 nonGroupTubes->Delete();
355 groupTubesGroupIds->Delete();
356 nonGroupTubesGroupIds->Delete();
357 centerlineGroupIds->Delete();
358
359 return 1;
360}
virtual void SetInput(vtkPolyData *)
virtual void SetPolyBallRadiusArrayName(const char *)
virtual void SetInputCellIds(vtkIdList *)
virtual void SetUseRadiusInformation(int)
static vtkvmtkPolyBallLine * New()
double EvaluateFunction(double x[3]) override

Member Data Documentation

◆ Centerlines

vtkPolyData* vtkvmtkPolyDataCenterlineGroupsClipper::Centerlines
protected

Definition at line 170 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ CenterlineGroupIds

vtkIdList* vtkvmtkPolyDataCenterlineGroupsClipper::CenterlineGroupIds
protected

Definition at line 172 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ CenterlineGroupIdsArrayName

char* vtkvmtkPolyDataCenterlineGroupsClipper::CenterlineGroupIdsArrayName
protected

Definition at line 174 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ CenterlineRadiusArrayName

char* vtkvmtkPolyDataCenterlineGroupsClipper::CenterlineRadiusArrayName
protected

Definition at line 175 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ GroupIdsArrayName

char* vtkvmtkPolyDataCenterlineGroupsClipper::GroupIdsArrayName
protected

Definition at line 177 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ BlankingArrayName

char* vtkvmtkPolyDataCenterlineGroupsClipper::BlankingArrayName
protected

Definition at line 178 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ ClipAllCenterlineGroupIds

int vtkvmtkPolyDataCenterlineGroupsClipper::ClipAllCenterlineGroupIds
protected

Definition at line 180 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ CutoffRadiusFactor

double vtkvmtkPolyDataCenterlineGroupsClipper::CutoffRadiusFactor
protected

Definition at line 181 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ ClipValue

double vtkvmtkPolyDataCenterlineGroupsClipper::ClipValue
protected

Definition at line 182 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ GenerateClippedOutput

int vtkvmtkPolyDataCenterlineGroupsClipper::GenerateClippedOutput
protected

Definition at line 184 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.

◆ UseRadiusInformation

int vtkvmtkPolyDataCenterlineGroupsClipper::UseRadiusInformation
protected

Definition at line 186 of file vtkvmtkPolyDataCenterlineGroupsClipper.h.


The documentation for this class was generated from the following files: