matnwb
matnwb copied to clipboard
[Bug]: toTable method does not work on PlaneSegmentation objects
What happened?
toTable method does not work on PlaneSegmentation objects
Steps to Reproduce
% generate fake image_mask data
imaging_shape = [100, 100];
x = imaging_shape(1);
y = imaging_shape(2);
n_rois = 20;
image_mask = zeros(y, x, n_rois);
for i = 1:n_rois
start = randi(90,2,1);
image_mask(start(1):start(1)+10, start(2):start(2)+10, 1) = 1;
end
% add data to NWB structures
plane_segmentation = types.core.PlaneSegmentation( ...
'colnames', {'image_mask'}, ...
'description', 'output from segmenting my favorite imaging plane', ...
'id', types.hdmf_common.ElementIdentifiers('data', int64(0:19)'), ...
'image_mask', types.hdmf_common.VectorData('data', image_mask, 'description', 'image masks') ...
);
Error Message
Error using tabular/horzcat
All tables being horizontally concatenated must have the same number of rows.
Error in matnwb.types.util.dynamictable.nwbToTable (line 81)
matlabTable = [matlabTable DynamicTable.getRow( ...
Error in matnwb.types.hdmf_common.DynamicTable/toTable (line 124)
table = matnwb.types.util.dynamictable.nwbToTable(obj, varargin{:});
Operating System
macOS
Matlab Version
MATLAB_R2023
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] Have you ensured this bug was not already reported?