本文整理汇总了C++中int32arraytype::Pointer::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::getName方法的具体用法?C++ Pointer::getName怎么用?C++ Pointer::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类int32arraytype::Pointer
的用法示例。
在下文中一共展示了Pointer::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvertData
/**
* @brief ConvertData Templated function that converts an IDataArray to a given primitive type
* @param ptr IDataArray instance pointer
* @param dims Component dimensions
* @param m DataContainer instance pointer
* @param scalarType Primitive type to convert to
* @param attributeMatrixName Name of target AttributeMatrix
* @param name Name of converted array
*/
void ConvertData(T* ptr, QVector<size_t> dims, DataContainer::Pointer m, int32_t scalarType, const QString attributeMatrixName, const QString& name)
{
int voxels = ptr->getNumberOfTuples();
size_t size = ptr->getSize();
if (scalarType == Detail::Int8)
{
Int8ArrayType::Pointer p = Int8ArrayType::CreateArray(voxels, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(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, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(p->getName(), p);
for(size_t v = 0; v < size; ++v)
{
p->setValue(v, ptr->getValue(v) );
}
}
else if (scalarType == Detail::Double)
{
DoubleArrayType::Pointer p = DoubleArrayType::CreateArray(voxels, dims, name);
m->getAttributeMatrix(attributeMatrixName)->addAttributeArray(p->getName(), p);
for(size_t v = 0; v < size; ++v)
//.........这里部分代码省略.........