MCPcopy Create free account
hub / github.com/Kitware/VTK / get_ids

Function get_ids

Filters/ParallelDIY2/vtkAdaptiveResampleToImage.cxx:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75vtkSmartPointer<vtkIdList> get_ids(vtkDataSetAttributes* source, unsigned char ghostFlag)
76{
77 auto mask = get_mask_array(source);
78 if (!mask)
79 {
80 return nullptr;
81 }
82
83 vtkNew<vtkIdList> ids;
84 ids->Allocate(mask->GetNumberOfTuples());
85 for (vtkIdType cc = 0; cc < mask->GetNumberOfTuples(); ++cc)
86 {
87 if ((mask->GetTypedComponent(cc, 0) & ghostFlag) != ghostFlag)
88 {
89 ids->InsertNextId(cc);
90 }
91 }
92
93 return ids->GetNumberOfIds() > 0 ? ids.GetPointer() : nullptr;
94}
95
96bool merge(vtkImageData* target, std::vector<vtkSmartPointer<vtkImageData>>& sources)
97{

Callers 1

mergeFunction · 0.85

Calls 6

InsertNextIdMethod · 0.80
AllocateMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetTypedComponentMethod · 0.45
GetNumberOfIdsMethod · 0.45
GetPointerMethod · 0.45

Tested by

no test coverage detected