Back to the main page.

Bug 2408 - ft_datatype_volume does not specify unit as an optional or required field

Status ASSIGNED
Reported 2013-12-03 18:36:00 +0100
Modified 2015-02-11 10:42:55 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2013-12-03 18:36:35 +0100

...actually I think that it should be a required field. Furthermore, coordsys is not mentioned (should be optional).


Robert Oostenveld - 2013-12-03 18:38:34 +0100

it would save some checks elsewhere in the code if ft_checkdata were to address this. mac001> grep ft_convert_units.*mri *.m */*.m ft_prepare_sourcemodel.m: mri = ft_convert_units(mri); ft_prepare_sourcemodel.m: mri = ft_convert_units(mri, 'mm'); ft_volumesegment.m: mri = ft_convert_units(mri, 'mm'); fileio/ft_read_mri.m: mri = ft_convert_units(mri); forward/ft_iso2surf.m:%mri = ft_convert_units(mri); test/test_ft_prepare_localspheres.m:segmentedmri = ft_convert_units(segmentedmri,'cm'); But I do now see that ft_checkdata has the option "hasunits", which by default is 'no'. So that might also address it.


Robert Oostenveld - 2013-12-04 11:41:08 +0100

mac001> svn commit utilities/ft_datatype_volume.m Sending utilities/ft_datatype_volume.m Transmitting file data . Committed revision 8951. it now mentions them as optional


Robert Oostenveld - 2013-12-04 11:44:10 +0100

mac001> svn commit utilities/ft_datatype_segmentation.m Sending utilities/ft_datatype_segmentation.m Transmitting file data . Committed revision 8953. ft_datatype_segmentation mentions both of them, this commit includes a small fix to the documentation.