Skip to content

Commit b0bcd98

Browse files
committed
update densecrf3d
2 parents fca235c + ff90555 commit b0bcd98

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

densecrf_python/densecrf3d.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,22 @@ dense_crf_wrapper(PyObject *self, PyObject *args)
141141
(unsigned char *)arr_I->data);
142142
MatrixXf probMapsMatrix = crf3d.inference(MaxIterations);
143143
VectorXs segmentationVector = crf3d.currentMap(probMapsMatrix);
144+
<<<<<<< HEAD
144145
npy_intp outshape[3];
145146
outshape[0] = shape_P[0];
146147
outshape[1] = shape_P[1];
147148
outshape[2] = shape_P[2];
148149
PyArrayObject * labels = (PyArrayObject*) PyArray_SimpleNew(3, outshape, NPY_INT8);
150+
=======
151+
152+
npy_intp shape_labels[] = {shape_P[0], shape_P[1], shape_P[2]};
153+
PyArrayObject * labels = (PyArrayObject*) PyArray_SimpleNew(3, shape_labels, NPY_INT8);
154+
npy_int8 * c_labels = (npy_int8*) PyArray_BYTES(labels);
155+
156+
>>>>>>> ff90555cc694db682481a9d64d21b7f08458c7cc
149157
for(int i = 0; i < num_voxel; i++)
150158
{
151-
*(labels->data + i) = segmentationVector(i);
159+
c_labels[i] = (npy_int8) segmentationVector(i);
152160
}
153161

154162
Py_DECREF(arr_I);

0 commit comments

Comments
 (0)