|
| 1 | +% nix.Feature class provides additional functionality to nix.Tag and nix.MultiTag. |
| 2 | +% |
| 3 | +% Features are created from a nix.Tag or a nix.MultiTag, linking these to an |
| 4 | +% additional nix.DataArray. The way how data from the respective DataArray |
| 5 | +% and the Tag/MultiTag are connected, is specified by the nix.LinkType of |
| 6 | +% the associated nix.Feature. |
| 7 | +% |
| 8 | +% nix.Property properties: |
| 9 | +% id (char): read-only, automatically created id of the entity. |
| 10 | +% linkType (nix.LinkType): see nix.LinkType description below. |
| 11 | +% |
| 12 | +% nix.LinkType.Tagged |
| 13 | +% This LinkType indicates, that the position and extent will be applied also |
| 14 | +% to the data stored via the Feature when it is fetched via the Tag/MultiTag. |
| 15 | +% |
| 16 | +% nix.LinkType.Untagged |
| 17 | +% This implies that the whole data stored in the linked DataArray belongs to |
| 18 | +% the Feature. |
| 19 | +% |
| 20 | +% nix.LinkType.Indexed |
| 21 | +% This LinkType is only valid for MultiTags where it indicates that the data linked |
| 22 | +% via this Feature has to be accessed according to the index in the respective |
| 23 | +% MulitTag position entry. |
| 24 | +% |
| 25 | +% Examples: %-- Returns the Features LinkType. |
| 26 | +% lt = currFeature.linkType(); |
| 27 | +% %-- Sets the Feature LinkType. Has to be a valid nix.LinkType. |
| 28 | +% currFeature.linkType(nix.LinkType.Tagged); |
| 29 | +% |
| 30 | +% See also nix.LinkType, nix.DataArray, nix.Tag, nix.MultiTag. |
| 31 | +% |
| 32 | +% |
1 | 33 | % Copyright (c) 2016, German Neuroinformatics Node (G-Node)
|
2 | 34 | %
|
3 | 35 | % All rights reserved.
|
|
7 | 39 | % LICENSE file in the root of the Project.
|
8 | 40 |
|
9 | 41 | classdef Feature < nix.Entity
|
10 |
| - % Feature nix Feature object |
11 | 42 |
|
12 | 43 | properties (Hidden)
|
13 |
| - % namespace reference for nix-mx functions |
14 |
| - alias = 'Feature' |
| 44 | + alias = 'Feature' % nix-mx namespace to access Feature specific nix backend functions. |
15 | 45 | end
|
16 | 46 |
|
17 | 47 | properties (Dependent)
|
|
39 | 69 | end
|
40 | 70 |
|
41 | 71 | function r = openData(obj)
|
| 72 | + % Returns the DataArray referenced by the invoking Feature. |
| 73 | + % |
| 74 | + % Returns: (nix.DataArray) The unmodified DataArray entity |
| 75 | + % referenced by the invoking Feature. |
| 76 | + % |
| 77 | + % Example: getDataArray = currFeature.openData(); |
| 78 | + % |
| 79 | + % See also nix.DataArray. |
| 80 | + |
42 | 81 | fname = strcat(obj.alias, '::openData');
|
43 | 82 | h = nix_mx(fname, obj.nixhandle);
|
44 | 83 | r = nix.Utils.createEntity(h, @nix.DataArray);
|
45 | 84 | end
|
46 | 85 |
|
47 |
| - function [] = setData(obj, data) |
48 |
| - id = nix.Utils.parseEntityId(data, 'nix.DataArray'); |
| 86 | + function [] = setData(obj, idNameEntity) |
| 87 | + % Sets the DataArray referenced by the invoking Feature. |
| 88 | + % |
| 89 | + % idNameEntity (char/nix.DataArray): Name or id of the DataArray to be set |
| 90 | + % or the DataArray itself. Sets the |
| 91 | + % reference to the DataArray associated |
| 92 | + % with the invoking Feature. Will replace |
| 93 | + % any previous set reference. |
| 94 | + % |
| 95 | + % Example: currFeature.setData('some-data-array-id'); |
| 96 | + % currFeature.setData('sessionData1'); |
| 97 | + % currFeature.setData(dataArrayEntity); |
| 98 | + % |
| 99 | + % See also nix.DataArray. |
| 100 | + |
| 101 | + parsed = nix.Utils.parseEntityId(idNameEntity, 'nix.DataArray'); |
49 | 102 | fname = strcat(obj.alias, '::setData');
|
50 |
| - nix_mx(fname, obj.nixhandle, id); |
| 103 | + nix_mx(fname, obj.nixhandle, parsed); |
51 | 104 | end
|
52 | 105 | end
|
53 | 106 |
|
|
0 commit comments