Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
toolbox
Commits
04b632fd
Commit
04b632fd
authored
7 years ago
by
Daniel Filbert
Browse files
Options
Downloads
Patches
Plain Diff
Extended implementation of class DAFF
parent
efe87c90
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/DAFF.m
+45
-1
45 additions, 1 deletion
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/DAFF.m
with
45 additions
and
1 deletion
applications/VirtualAcoustics/openDAFF/OpenDAFFv1.7/DAFF.m
+
45
−
1
View file @
04b632fd
...
@@ -5,6 +5,8 @@ classdef DAFF < handle
...
@@ -5,6 +5,8 @@ classdef DAFF < handle
end
end
methods
methods
function
obj
=
DAFF
(
filepath
)
function
obj
=
DAFF
(
filepath
)
%% Create DAFF class and load from file
% filepath Path to DAFF file
if
(
nargin
>
0
)
if
(
nargin
>
0
)
open
(
filepath
)
open
(
filepath
)
end
end
...
@@ -12,14 +14,56 @@ classdef DAFF < handle
...
@@ -12,14 +14,56 @@ classdef DAFF < handle
function
open
(
obj
,
filepath
)
function
open
(
obj
,
filepath
)
obj
.
daffhandle
=
DAFFv17
(
'open'
,
filepath
);
obj
.
daffhandle
=
DAFFv17
(
'open'
,
filepath
);
end
end
function
close
(
obj
)
end
function
set_data_view
(
obj
)
function
set_data_view
(
obj
)
obj
.
view
=
'data'
;
obj
.
view
=
'data'
;
end
end
function
set_object_view
(
obj
)
function
set_object_view
(
obj
)
obj
.
view
=
'object'
;
obj
.
view
=
'object'
;
end
end
function
metadata
=
get_metadata
(
obj
)
%% Returns the metadata of an opened DAFF file
metadata
=
DAFFv17
(
'getMetadata'
,
obj
.
daffhandle
);
end
function
metadata
=
get_record_metadata
(
obj
,
index
)
%% Returns the record metadata of an opened DAFF file
metadata
=
DAFFv17
(
'getRecordMetadata'
,
obj
.
daffhandle
,
index
);
end
function
props
=
get_properties
(
obj
)
%% Returns the properties of an opened DAFF file
props
=
DAFFv17
(
'getProperties'
,
obj
.
daffhandle
);
function
coords
=
get_record_coords
(
obj
,
index
)
%% Returns the coordinates of a grid point
coords
=
DAFFv17
(
'getRecordCoords'
,
obj
.
daffhandle
,
obj
.
view
,
index
);
end
function
idx
=
get_nearest_neighbour_index
(
obj
,
azi_deg
,
ele_deg
)
function
idx
=
get_nearest_neighbour_index
(
obj
,
azi_deg
,
ele_deg
)
idx = DAFFv17( obj.daffhandle, 'getNearestNeighbourIndex', obj.view, azi_deg, ele_deg );
%% Returns the data at the nearest neighbour grid point to the given direction
idx
=
DAFFv17
(
'getNearestNeighbourIndex'
,
obj
.
daffhandle
,
obj
.
view
,
azi_deg
,
ele_deg
);
end
function
data
=
get_nearest_neighbour_record
(
obj
,
azi_deg
,
ele_deg
)
%% Returns the data at the nearest neighbour grid point to the given direction
data
=
DAFFv17
(
'getNearestNeighbourRecord'
,
obj
.
daffhandle
,
obj
.
view
,
azi_deg
,
ele_deg
);
end
function
rec
=
get_record_by_index
(
obj
,
idx
)
%% Returns the data at a grid of the given index
rec
=
DAFFv17
(
'getRecordByIndex'
,
obj
.
daffhandle
,
idx
);
end
function
data
=
get_cell_records
(
obj
,
azi_deg
,
ele_deg
)
%% Returns the data of all four records of the surrounding cell to the given direction
data
=
DAFFv17
(
'getCellRecords'
,
obj
.
daffhandle
,
obj
.
view
,
azi_deg
,
ele_deg
);
end
function
idx
=
get_cell
(
obj
,
azi_deg
,
ele_deg
)
%% Returns the data at the nearest neighbour grid point to the given direction
idx
=
DAFFv17
(
'getCell'
,
obj
.
daffhandle
,
obj
.
view
,
azi_deg
,
ele_deg
);
end
function
get_version
(
obj
)
%% Returns the OpenDAFF version
DAFFv17
(
'getVersion'
)
end
function
help
(
obj
)
DAFFv17
(
'help'
);
end
end
end
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment