File tree Expand file tree Collapse file tree 5 files changed +75
-12
lines changed Expand file tree Collapse file tree 5 files changed +75
-12
lines changed Original file line number Diff line number Diff line change 2626 data = cat(dim , data , var .Data );
2727end
2828
29- res = Image(' data' , data );
29+ res = Image(' data' , data , ' Parent ' , obj );
Original file line number Diff line number Diff line change 1616
1717% ------
1818% Author: David Legland
19- % e-mail: david.legland@inra .fr
19+ % e-mail: david.legland@inrae .fr
2020% Created: 2011-08-04, using Matlab 7.9.0.529 (R2009b)
2121% Copyright 2011 INRA - Cepia Software Platform.
2222
23- data = obj .data ;
24- name = obj .name ;
23+ data = obj .Data ;
24+ name = obj .Name ;
2525
2626for i = 1 : length(varargin )
27- var = varargin{i };
28- data = [data ; var .data ]; % #ok<AGROW>
27+ var = varargin{i };
28+ data = [data ; var .Data ]; % #ok<AGROW>
2929
30- name = strcat(name , ' +' , var .name );
30+ name = strcat(name , ' +' , var .Name );
3131end
3232
3333res = Image( ...
34- ' data ' , data , ...
35- ' parent ' , obj , ...
36- ' name ' , name );
34+ ' Data ' , data , ...
35+ ' Parent ' , obj , ...
36+ ' Name ' , name );
Original file line number Diff line number Diff line change 55% RES = [IMG1 ; IMG2];
66%
77% Example
8- % vertcat
8+ % % duplicate image in vertical direction
9+ % img = Image.read('cameraman.tif');
10+ % res = vertcat(img, img);
11+ % show(res);
912%
1013% See also
1114% horzcat, repmat, cat
1215%
1316
1417% ------
1518% Author: David Legland
16- % e-mail: david.legland@inra .fr
19+ % e-mail: david.legland@inrae .fr
1720% Created: 2011-08-04, using Matlab 7.9.0.529 (R2009b)
1821% Copyright 2011 INRA - Cepia Software Platform.
1922
Original file line number Diff line number Diff line change 1+ function tests = test_horzcat
2+ % Test suite for the file horzcat.
3+ %
4+ % Test suite for the file horzcat
5+ %
6+ % Example
7+ % test_horzcat
8+ %
9+ % See also
10+ % horzcat
11+
12+ % ------
13+ % Author: David Legland
14+ % e-mail: david.legland@inrae.fr
15+ % Created: 2020-12-07, using Matlab 9.8.0.1323502 (R2020a)
16+ % Copyright 2020 INRAE - BIA-BIBS.
17+
18+ tests = functiontests(localfunctions );
19+
20+ function test_Simple(testCase ) % #ok<*DEFNU>
21+ % Test call of function without argument.
22+
23+ data = 200 * ones([20 30 ], ' uint8' );
24+ img = Image(data );
25+
26+ res = horzcat(img , img );
27+
28+ assertTrue(testCase , isa(res , ' Image' ));
29+ assertEqual(testCase , size(res ), [60 20 ]);
30+
Original file line number Diff line number Diff line change 1+ function tests = test_vertcat
2+ % Test suite for the file vertcat.
3+ %
4+ % Test suite for the file vertcat
5+ %
6+ % Example
7+ % test_vertcat
8+ %
9+ % See also
10+ % vertcat
11+
12+ % ------
13+ % Author: David Legland
14+ % e-mail: david.legland@inrae.fr
15+ % Created: 2020-12-07, using Matlab 9.8.0.1323502 (R2020a)
16+ % Copyright 2020 INRAE - BIA-BIBS.
17+
18+ tests = functiontests(localfunctions );
19+
20+ function test_Simple(testCase ) % #ok<*DEFNU>
21+ % Test call of function without argument.
22+
23+ data = 200 * ones([20 30 ], ' uint8' );
24+ img = Image(data );
25+
26+ res = vertcat(img , img );
27+
28+ assertTrue(testCase , isa(res , ' Image' ));
29+ assertEqual(testCase , size(res ), [30 40 ]);
30+
You can’t perform that action at this time.
0 commit comments