Part table example in documentation does not work
Closed this issue · 2 comments
mjlm commented
On my system, the part table example given in the documentation (here) lacks a (SetAccess=protected)
, causing Matlab to throw this error:
The definition of property 'master' in class 'test.SegmentationROI ' differs
from its definition in the superclass 'dj.Part'. This is caused by either
conflicting access permissions or differing values of the Constant attribute.
The error is fixed by adding (SetAccess=protected)
to the properties section:
classdef SegmentationROI < dj.Part
properties(SetAccess=protected)
master = test.Segmentation
end
methods
function makeTuples(self, key)
image = fetch1(test.Image & key, 'image');
[roi_pixels, roi_weighs] = mylib.segment(image);
for roi=1:length(roi_pixels)
tuple = key;
tuple.roi_pixels = roi_pixels{roi};
tuple.roi_weights = roi_weights{roi};
self.insert(tuple)
end
end
end
end
eywalker commented
Hi @mjlm thanks for catching this! In the future, it would be great if you would submit issues related to the documentation at https://github.com/datajoint/datajoint-docs.
eywalker commented
I have moved this issue to datajoint/datajoint-docs#9 and will work on there. Close this issue here.