Skip to content

A question about how to get the iso value in V1 #303

@RainSureZhao

Description

@RainSureZhao

In the V1 version of the code, iso-value is calculated using the Octree::GetIsoValue() function, but the internal implementation of this function looks different from the original paper (2006); I don't quite understand the meaning of valueTable in the code (fData.setValueTables(fData.VALUE_FLAG,0)), and the meaning of the centerWeightContribution of each octree node at this time, which is calculated from the normal vector; In the original paper (2006), every point in the original point cloud is substituted into the octree to calculate a field value, and then calculate the average calculation. Why not adopt this method here? Are there any disadvantages?

    template<int Degree>
    Real Octree<Degree>::GetIsoValue(){
        const TreeOctNode* temp;
        Real isoValue, weightSum, w;
        Real myRadius;
        PointIndexValueFunction cf{};
        Point3D<Real> center;
        Real width;

        fData.setValueTables(fData.VALUE_FLAG,0);
        cf.valueTables = fData.valueTables;
        cf.res2 = fData.res2;
        myRadius = radius;
        isoValue = weightSum = 0;
        temp = tree.nextNode();
        while(temp){
            w = temp->nodeData.centerWeightContribution;
            if(w > EPSILON){
                cf.value = 0;
                VertexData::CenterIndex(temp,fData.depth,cf.index);
                temp->centerAndWidth(center,width);
                TreeOctNode::ProcessPointAdjacentNodes(center, &tree, myRadius, &cf);
                isoValue += cf.value * w;
                weightSum += w;
            }
            temp = tree.nextNode(temp);
        }
        return isoValue / weightSum;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions