本文整理汇总了C++中Voxel::getZ方法的典型用法代码示例。如果您正苦于以下问题:C++ Voxel::getZ方法的具体用法?C++ Voxel::getZ怎么用?C++ Voxel::getZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voxel
的用法示例。
在下文中一共展示了Voxel::getZ方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: trackFiber_backward
void Fibertracking::trackFiber_backward()
{
using namespace std;
Voxel *current = &voxels[cur_voxel_index];
Vector *curVec;
// current->setVisited(false);
start_o = *new Vector( (current->getX()+0.5)*voxelext_x, (current->getY()+0.5)*voxelext_y, (current->getZ()+0.5)*voxelext_z );
// Startpunkt einschreiben
nextVoxel_backward();
if ( current == &voxels[cur_voxel_index])
{
return;
}
else
{
current->setVisited(true);
current = &voxels[cur_voxel_index];
}
while (current->getAnisotropy() > min_anisotropy && !current->isVisited() && (fabs(intersec_angle) < max_intersec_angle) )
{
// current->setVisited(true);
curVec = new Vector((double)(voxels[cur_voxel_index].getDir_Index()), (double)cur_voxel_index, 0.);
curVectorList.add_at_start(*curVec);
curVectorList.add_at_start(start_o);
currentFiber.add_at_start(*current);
nextVoxel_backward();
if ( current == &voxels[cur_voxel_index])
{
break;
}
else
{
current->setVisited(true);
current = &voxels[cur_voxel_index];
}
}
if (current->isVisited())
{
n_visited++;
}
else
{
if (current->getAnisotropy() < min_anisotropy)
{
n_aniso++;
}
else
{
if (fabs(intersec_angle) > max_intersec_angle)
{
n_angle++;
}
}
}
}
示例2: trackFiber_forward
void Fibertracking::trackFiber_forward()
{
using namespace std;
Voxel *current = &voxels[cur_voxel_index];
Vector *curVec;
start_o = *new Vector( (current->getX()+0.5)*voxelext_x, (current->getY()+0.5)*voxelext_y, (current->getZ()+0.5)*voxelext_z );
curVectorList = *new VectorList();
while (current->getAnisotropy() > min_anisotropy && !current->isVisited() && (fabs(intersec_angle) < max_intersec_angle) )
{
// current->print();
currentFiber.add_at_end(*current);
curVectorList.add_at_end(start_o); // schreibt den Schnittpunkt an die verkettete Liste
curVec = new Vector((double)(voxels[cur_voxel_index].getDir_Index()), (double)cur_voxel_index, 0.);
curVectorList.add_at_end(*curVec);
nextVoxel_forward();
if ( current == &voxels[cur_voxel_index]) // || voxels[cur_voxel_index].isVisited()
{
break;
}
else
{
current->setVisited(true);
current = &voxels[cur_voxel_index];
}
}
if (current->isVisited())
{
n_visited++;
}
else
{
if (current->getAnisotropy() < min_anisotropy)
{
n_aniso++;
}
else
{
if (fabs(intersec_angle) > max_intersec_angle)
{
n_angle++;
}
}
}
}