本文整理汇总了C++中int32arraytype::Pointer::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetName方法的具体用法?C++ Pointer::GetName怎么用?C++ Pointer::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类int32arraytype::Pointer
的用法示例。
在下文中一共展示了Pointer::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvertData
void ConvertData(T* ptr, VoxelDataContainer* m, int32_t scalarType, const std::string &name)
{
int numberOfComponents = ptr->GetNumberOfComponents();
int voxels = ptr->GetNumberOfTuples();
size_t size = ptr->GetSize();
if (scalarType == Detail::Int8)
{
Int8ArrayType::Pointer p = Int8ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::UInt8)
{
UInt8ArrayType::Pointer p = UInt8ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::Int16)
{
Int16ArrayType::Pointer p = Int16ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::UInt16)
{
UInt16ArrayType::Pointer p = UInt16ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::Int32)
{
Int32ArrayType::Pointer p = Int32ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::UInt32)
{
UInt32ArrayType::Pointer p = UInt32ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::Int64)
{
Int64ArrayType::Pointer p = Int64ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::UInt64)
{
UInt64ArrayType::Pointer p = UInt64ArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
else if (scalarType == Detail::Float)
{
FloatArrayType::Pointer p = FloatArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
}
else if (scalarType == Detail::Double)
{
DoubleArrayType::Pointer p = DoubleArrayType::CreateArray(voxels, numberOfComponents, name);
m->addCellData(p->GetName(), p);
for(size_t v = 0; v < size; ++v)
{
p->SetValue(v, ptr->GetValue(v) );
}
}
}