@@ -75,52 +75,81 @@ class HDF5Impl : public HDF5
75
75
// get sizes of dataset
76
76
virtual vector<int > dsgetsize ( String dslabel, int dims_flag = H5_GETDIMS ) const ;
77
77
78
- // get data type of dataset
78
+ /* get data type of dataset */
79
79
virtual int dsgettype ( String dslabel ) const ;
80
80
81
- // overload dscreate()
82
- virtual void dscreate ( const int rows, const int cols, const int type,
83
- String dslabel, const int compresslevel = H5_NONE,
84
- const vector<int >& dims_chunks = vector<int >() ) const ;
81
+ // overload dscreate() #1
82
+ virtual void dscreate ( const int rows, const int cols, const int type, String dslabel ) const ;
85
83
86
- // create two dimensional single or mutichannel dataset
87
- virtual void dscreate ( const int rows, const int cols, const int type,
88
- String dslabel, const int compresslevel = H5_NONE, const int * dims_chunks = NULL ) const ;
84
+ // overload dscreate() #2
85
+ virtual void dscreate ( const int rows, const int cols, const int type, String dslabel,
86
+ const int compresslevel ) const ;
89
87
90
- // overload dscreate()
88
+ // overload dscreate() #3
89
+ virtual void dscreate ( const int rows, const int cols, const int type, String dslabel,
90
+ const int compresslevel, const vector<int >& dims_chunks ) const ;
91
+
92
+ /* create two dimensional single or mutichannel dataset */
93
+ virtual void dscreate ( const int rows, const int cols, const int type, String dslabel,
94
+ const int compresslevel, const int * dims_chunks ) const ;
95
+
96
+ // overload dscreate() #1
97
+ virtual void dscreate ( const int n_dims, const int * sizes, const int type,
98
+ String dslabel ) const ;
99
+
100
+ // overload dscreate() #2
101
+ virtual void dscreate ( const int n_dims, const int * sizes, const int type,
102
+ String dslabel, const int compresslevel ) const ;
103
+
104
+ // overload dscreate() #3
91
105
virtual void dscreate ( const vector<int >& sizes, const int type, String dslabel,
92
106
const int compresslevel = H5_NONE, const vector<int >& dims_chunks = vector<int >() ) const ;
93
107
94
- // create n-dimensional single or mutichannel dataset
108
+ /* create n-dimensional single or mutichannel dataset */
95
109
virtual void dscreate ( const int n_dims, const int * sizes, const int type,
96
- String dslabel, const int compresslevel = H5_NONE , const int * dims_chunks = NULL ) const ;
110
+ String dslabel, const int compresslevel, const int * dims_chunks ) const ;
97
111
98
- // overload dswrite()
99
- virtual void dswrite ( InputArray Array, String dslabel,
100
- const vector<int >& dims_offset = vector<int >(),
112
+ // overload dswrite() #1
113
+ virtual void dswrite ( InputArray Array, String dslabel ) const ;
114
+
115
+ // overload dswrite() #2
116
+ virtual void dswrite ( InputArray Array, String dslabel, const int * dims_offset ) const ;
117
+
118
+ // overload dswrite() #3
119
+ virtual void dswrite ( InputArray Array, String dslabel, const vector<int >& dims_offset,
101
120
const vector<int >& dims_counts = vector<int >() ) const ;
102
121
103
- // write into dataset
122
+ /* write into dataset */
104
123
virtual void dswrite ( InputArray Array, String dslabel,
105
- const int * dims_offset = NULL , const int * dims_counts = NULL ) const ;
124
+ const int * dims_offset, const int * dims_counts ) const ;
125
+
126
+ // overload dsinsert() #1
127
+ virtual void dsinsert ( InputArray Array, String dslabel ) const ;
106
128
107
- // overload dsinsert()
129
+ // overload dsinsert() #2
130
+ virtual void dsinsert ( InputArray Array, String dslabel, const int * dims_offset ) const ;
131
+
132
+ // overload dsinsert() #3
108
133
virtual void dsinsert ( InputArray Array, String dslabel,
109
- const vector<int >& dims_offset = vector<int >(),
110
- const vector<int>& dims_counts = vector<int>() ) const ;
134
+ const vector<int >& dims_offset, const vector<int >& dims_counts = vector<int >() ) const ;
111
135
112
- // append / merge into dataset
136
+ /* append / merge into dataset */
113
137
virtual void dsinsert ( InputArray Array, String dslabel,
114
138
const int * dims_offset = NULL , const int * dims_counts = NULL ) const ;
115
139
116
- // overload dsread()
140
+ // overload dsread() #1
141
+ virtual void dsread ( OutputArray Array, String dslabel ) const ;
142
+
143
+ // overload dsread() #2
144
+ virtual void dsread ( OutputArray Array, String dslabel, const int * dims_offset ) const ;
145
+
146
+ // overload dsread() #3
117
147
virtual void dsread ( OutputArray Array, String dslabel,
118
- const vector<int >& dims_offset = vector<int >(),
119
- const vector<int>& dims_counts = vector<int>() ) const ;
148
+ const vector<int >& dims_offset, const vector<int >& dims_counts = vector<int >() ) const ;
120
149
121
150
// read from dataset
122
151
virtual void dsread ( OutputArray Array, String dslabel,
123
- const int * dims_offset = NULL , const int * dims_counts = NULL ) const ;
152
+ const int * dims_offset, const int * dims_counts ) const ;
124
153
125
154
/*
126
155
* std::vector<cv::KeyPoint>
@@ -351,6 +380,28 @@ int HDF5Impl::dsgettype( String dslabel ) const
351
380
return CV_MAKETYPE ( cvtype, channs );
352
381
}
353
382
383
+ // overload
384
+ void HDF5Impl::dscreate ( const int rows, const int cols, const int type,
385
+ String dslabel ) const
386
+ {
387
+ // dataset dims
388
+ int dsizes[2 ] = { rows, cols };
389
+
390
+ // create the two dim array
391
+ dscreate ( 2 , dsizes, type, dslabel, HDF5::H5_NONE, NULL );
392
+ }
393
+
394
+ // overload
395
+ void HDF5Impl::dscreate ( const int rows, const int cols, const int type,
396
+ String dslabel, const int compresslevel ) const
397
+ {
398
+ // dataset dims
399
+ int dsizes[2 ] = { rows, cols };
400
+
401
+ // create the two dim array
402
+ dscreate ( 2 , dsizes, type, dslabel, compresslevel, NULL );
403
+ }
404
+
354
405
// overload
355
406
void HDF5Impl::dscreate ( const int rows, const int cols, const int type,
356
407
String dslabel, const int compresslevel,
@@ -370,6 +421,20 @@ void HDF5Impl::dscreate( const int rows, const int cols, const int type,
370
421
dscreate ( 2 , dsizes, type, dslabel, compresslevel, dims_chunks );
371
422
}
372
423
424
+ // overload
425
+ void HDF5Impl::dscreate ( const int n_dims, const int * sizes, const int type,
426
+ String dslabel ) const
427
+ {
428
+ dscreate ( n_dims, sizes, type, dslabel, H5_NONE, NULL );
429
+ }
430
+
431
+ // overload
432
+ void HDF5Impl::dscreate ( const int n_dims, const int * sizes, const int type,
433
+ String dslabel, const int compresslevel ) const
434
+ {
435
+ dscreate ( n_dims, sizes, type, dslabel, compresslevel, NULL );
436
+ }
437
+
373
438
// overload
374
439
void HDF5Impl::dscreate ( const vector<int >& sizes, const int type,
375
440
String dslabel, const int compresslevel,
@@ -455,6 +520,19 @@ void HDF5Impl::dscreate( const int n_dims, const int* sizes, const int type,
455
520
H5Sclose ( dspace );
456
521
}
457
522
523
+ // overload
524
+ void HDF5Impl::dsread ( OutputArray Array, String dslabel ) const
525
+ {
526
+ dsread ( Array, dslabel, NULL , NULL );
527
+ }
528
+
529
+ // overload
530
+ void HDF5Impl::dsread ( OutputArray Array, String dslabel,
531
+ const int * dims_offset ) const
532
+ {
533
+ dsread ( Array, dslabel, dims_offset );
534
+ }
535
+
458
536
// overload
459
537
void HDF5Impl::dsread ( OutputArray Array, String dslabel,
460
538
const vector<int >& dims_offset,
@@ -557,6 +635,17 @@ void HDF5Impl::dsread( OutputArray Array, String dslabel,
557
635
H5Dclose ( dsdata );
558
636
}
559
637
638
+ // overload
639
+ void HDF5Impl::dswrite ( InputArray Array, String dslabel ) const
640
+ {
641
+ dswrite ( Array, dslabel, NULL , NULL );
642
+ }
643
+ // overload
644
+ void HDF5Impl::dswrite ( InputArray Array, String dslabel,
645
+ const int * dims_offset ) const
646
+ {
647
+ dswrite ( Array, dslabel, dims_offset, NULL );
648
+ }
560
649
// overload
561
650
void HDF5Impl::dswrite ( InputArray Array, String dslabel,
562
651
const vector<int >& dims_offset,
@@ -641,6 +730,19 @@ void HDF5Impl::dswrite( InputArray Array, String dslabel,
641
730
H5Dclose ( dsdata );
642
731
}
643
732
733
+ // overload
734
+ void HDF5Impl::dsinsert ( InputArray Array, String dslabel ) const
735
+ {
736
+ dsinsert ( Array, dslabel, NULL , NULL );
737
+ }
738
+
739
+ // overload
740
+ void HDF5Impl::dsinsert ( InputArray Array, String dslabel,
741
+ const int * dims_offset ) const
742
+ {
743
+ dsinsert ( Array, dslabel, dims_offset, NULL );
744
+ }
745
+
644
746
// overload
645
747
void HDF5Impl::dsinsert ( InputArray Array, String dslabel,
646
748
const vector<int >& dims_offset,
0 commit comments