Skip to content

Commit 05595f7

Browse files
committed
Not creating scalar in the input mesh anymore
1 parent 3f19f39 commit 05595f7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

ca_smoothing.cxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ vtkIdList* find_staircase_artifacts(vtkPolyData* pd, const double stack_orientat
3434

3535
double *ni;
3636
vtkIdList *output = vtkIdList::New();
37-
vtkDoubleArray *scalars = vtkDoubleArray::New();
3837
vtkIdList *idfaces;//idfaces = vtk.vtkIdList()
3938

4039
nv = pd->GetNumberOfPoints(); // Number of vertices.
@@ -71,15 +70,9 @@ vtkIdList* find_staircase_artifacts(vtkPolyData* pd, const double stack_orientat
7170
// output
7271
if ((abs(max_z - min_z) >= T) || (abs(max_y - min_y) >= T) || (abs(max_x - min_x) >= T)) {
7372
output->InsertNextId(vid);
74-
scalars->InsertNextValue(1);
75-
}
76-
else {
77-
scalars->InsertNextValue(0);
7873
}
7974
idfaces->Delete();
8075
}
81-
vtkPointData* pointData = pd->GetPointData();
82-
pointData->SetScalars(scalars);
8376
return output;
8477
}
8578

@@ -162,7 +155,6 @@ vtkDoubleArray* calc_artifacts_weight(vtkPolyData* pd, vtkIdList* vertices_stair
162155
int nid = vertices_staircase->GetNumberOfIds();
163156
vtkIdList* near_vertices;
164157
vtkDoubleArray* weights = vtkDoubleArray::New();
165-
vtkDataArray* scalars = pd->GetPointData()->GetScalars();
166158
for (int i=0; i < pd->GetNumberOfPoints(); i++){
167159
weights->InsertNextValue(0);
168160
}
@@ -180,14 +172,11 @@ vtkDoubleArray* calc_artifacts_weight(vtkPolyData* pd, vtkIdList* vertices_stair
180172
value = (1.0 - d/tmax) * (1 - bmin) + bmin;
181173
if (value > weights->GetValue(vjid)) {
182174
weights->SetValue(vjid, value);
183-
scalars->SetTuple1(vjid, value);
184175
}
185176
}
186177
near_vertices->Delete();
187178
}
188179

189-
vtkPointData* pointData = pd->GetPointData();
190-
pointData->SetScalars(scalars);
191180
return weights;
192181
}
193182

0 commit comments

Comments
 (0)