Skip to content

Commit

Permalink
update densecrf3d
Browse files Browse the repository at this point in the history
  • Loading branch information
taigw committed Aug 27, 2020
1 parent b0bcd98 commit 969d3c7
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions densecrf_python/densecrf3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,14 @@ dense_crf_wrapper(PyObject *self, PyObject *args)
(unsigned char *)arr_I->data);
MatrixXf probMapsMatrix = crf3d.inference(MaxIterations);
VectorXs segmentationVector = crf3d.currentMap(probMapsMatrix);
<<<<<<< HEAD
npy_intp outshape[3];
outshape[0] = shape_P[0];
outshape[1] = shape_P[1];
outshape[2] = shape_P[2];
PyArrayObject * labels = (PyArrayObject*) PyArray_SimpleNew(3, outshape, NPY_INT8);
=======

npy_intp shape_labels[] = {shape_P[0], shape_P[1], shape_P[2]};
PyArrayObject * labels = (PyArrayObject*) PyArray_SimpleNew(3, shape_labels, NPY_INT8);
npy_int8 * c_labels = (npy_int8*) PyArray_BYTES(labels);

>>>>>>> ff90555cc694db682481a9d64d21b7f08458c7cc
for(int i = 0; i < num_voxel; i++)
{
c_labels[i] = (npy_int8) segmentationVector(i);
*(labels->data + i) = segmentationVector(i);
}

Py_DECREF(arr_I);
Expand Down

0 comments on commit 969d3c7

Please sign in to comment.