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

Method GetNumberOfCells

Testing/GenericBridge/vtkBridgeDataSet.cxx:209–243  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Number of cells that explicitly define the dataset. See NewCellIterator for more details. \pre valid_dim_range: (dim>=-1) && (dim<=3) \post positive_result: result>=0

Source from the content-addressed store, hash-verified

207// \pre valid_dim_range: (dim>=-1) && (dim<=3)
208// \post positive_result: result>=0
209vtkIdType vtkBridgeDataSet::GetNumberOfCells(int dim)
210{
211 assert("pre: valid_dim_range" && (dim >= -1) && (dim <= 3));
212
213 vtkIdType result = 0;
214 if (this->Implementation != nullptr)
215 {
216 if (dim == -1)
217 {
218 result = this->Implementation->GetNumberOfCells();
219 }
220 else
221 {
222 this->ComputeNumberOfCellsAndTypes();
223 switch (dim)
224 {
225 case 0:
226 result = this->NumberOf0DCells;
227 break;
228 case 1:
229 result = this->NumberOf1DCells;
230 break;
231 case 2:
232 result = this->NumberOf2DCells;
233 break;
234 case 3:
235 result = this->NumberOf3DCells;
236 break;
237 }
238 }
239 }
240
241 assert("post: positive_result" && result >= 0);
242 return result;
243}
244
245//------------------------------------------------------------------------------
246// Description:

Callers 13

GetEstimatedSizeMethod · 0.95
InitWithOneCellMethod · 0.45
InitWithDataSetMethod · 0.45
InitWithOneCellMethod · 0.45
InitWithOnePointMethod · 0.45
InitMethod · 0.45
InitWithOnePointMethod · 0.45
ExecuteMethod · 0.45
ShrinkFieldDataFunction · 0.45
TestDataFailuresFunction · 0.45

Calls 2

assertFunction · 0.50

Tested by 5

ExecuteMethod · 0.36
ShrinkFieldDataFunction · 0.36
TestDataFailuresFunction · 0.36