Skip to content

Commit 00147ed

Browse files
committed
Update with latest changes for publication of thesis.
1 parent 212bc68 commit 00147ed

4 files changed

Lines changed: 28 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to the **LayerModel_lib** project will be documented in this
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.4.0]
8+
### Changed
9+
- add all dielectric properties to install using MANIFEST.in
10+
- update README for published version of thesis
11+
- some cosmetic changes for plotting the abdominal surfaces of the phantoms
12+
713
## [2.3.0] - 2023-01-19
814
### Added
915
- Polynomial Channel Model and its parameters for all phantoms and TX/RX locations

LayerModel_lib/voxelmodel.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,15 @@ def show_3d_model(self, model_type: str,
674674
show_clusters: Optional[bool] = False,
675675
colored_endpoint_indices: List[Tuple] = None,
676676
colored_surf3d_indices: List[Tuple] = None,
677+
default_face_color: Tuple = (1, 1, 1, 0.5),
677678
show_surf3d_indices: bool = False,
678679
show_endpoint_indices: bool = False,
679680
x_min_limit: float = None, x_max_limit: float = None,
680681
y_min_limit: float = None, y_max_limit: float = None,
681682
z_min_limit: float = None, z_max_limit: float = None,
682683
plot_origin: np.ndarray = None, plot_radius: float = None,
683-
transformation_vector: Coordinate = None) -> Tuple:
684+
transformation_vector: Coordinate = None,
685+
axes_off = True) -> Tuple:
684686
"""
685687
Open a plot showing the 3D model of the model_type given.
686688
@@ -695,6 +697,7 @@ def show_3d_model(self, model_type: str,
695697
:param colored_surf3d_indices: same as 'colored_endpoint_indices' only that indices into
696698
model['trunk'].surface_3d are given.
697699
:param show_surf3d_indices: Show the index of each surface patch
700+
:param default_face_color: Default color of the patches given as (r, g, b, alpha) tuple.
698701
:param x_max_limit: maximum x value to plot
699702
:param x_min_limit: minimum x value to plot
700703
:param y_max_limit: maximum y value to plot
@@ -704,6 +707,7 @@ def show_3d_model(self, model_type: str,
704707
:param plot_origin: origin for setting axis scaling equal -> handed over to set_axes_equal()
705708
:param plot_radius: radius for setting axis scaling equal -> handed over to set_axes_equal()
706709
:param transformation_vector: a vector giving the translation applied to all patches before drawing
710+
:param axes_off: turns axes of the figure off by default
707711
:return:
708712
"""
709713

@@ -734,12 +738,11 @@ def show_3d_model(self, model_type: str,
734738
if index in indices]
735739
colored_surf3d.append((color, hatch, endpoints))
736740

737-
# the default face color:
738-
default_face_color = (1, 1, 1, 0.5)
739741

740742
fig = plt.figure()
741743
ax = fig.add_subplot(111, projection='3d')
742-
ax.set_aspect('equal')
744+
# ax.set_aspect('equal')
745+
ax.set_box_aspect((1, 1, 1))
743746

744747
# save a list of min. and max. X, Y, Z coordinates
745748
x_min, y_min, z_min = [1e10] * 3
@@ -902,7 +905,8 @@ def show_3d_model(self, model_type: str,
902905
ax.elev = 19
903906
ax.azim = 10
904907
ax.dist = 6
905-
ax.set_axis_off()
908+
if axes_off:
909+
ax.set_axis_off()
906910
return fig, ax
907911

908912
def determine_physical_endpoint_mapping(self):
@@ -1071,7 +1075,7 @@ def plot_abdominal_endpoint_patches(self, endpoint_colors: Dict = None,
10711075
Plot all the abdominal endpoint patches as viewed from the front of the body.
10721076
10731077
:param endpoint_colors: Dict containing the colors for each abdominal endpoint.
1074-
key = endpoint index, value = color. For all endpoints not in the dict, the
1078+
key = endpoint index, value = list of colors. For all endpoints not in the dict, the
10751079
default_color will be used. The color value may be a tuple or list of colors.
10761080
:param default_color: The default color of the patches
10771081
:param hf Figure handle to plot the data in

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
include LayerModel_lib/ColeColeConstants.TissueProperties
22
include LayerModel_lib/PhantomColormap.npy
3+
include LayerModel_lib/channel_model.h5
4+
include LayerModel_lib/tissue_properties_fornesleal.json
5+
include LayerModel_lib/tissue_properties_gabriel.json
36
include README.md
47
recursive-include examples *.py *.md
58
recursive-include phantom_import *.py *.md

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
This repository provides a library to calculate transfer functions, path loss, channel capacity and various
99
other properties of in-body to on-body ultra wideband commincation using the layer modeling approach as introduced
10-
in [BB17]. Instead of simulating the wave propagation inside the human body using numerical methods, the transmission
11-
form transmitter TX to receiver RX is simplified by a plane wave travelling through a multi-layered dielectric.
10+
in [Bru24]. Instead of simulating the wave propagation inside the human body using numerical methods, the transmission
11+
from transmitter TX to receiver RX is simplified by a plane wave travelling through a multi-layered dielectric.
1212
The layers of this multi-layered dielectric can be determined from arbitrary voxel models.
1313

14-
It was shown in [BB17b], [BKB19], and [BB19] that the results from this layer modeling approach fit well to the results that
14+
It was shown in [Bru24], [BB17b], [BKB19], and [BB19] that the results from this layer modeling approach fit well to the results that
1515
have been published in the literature so far for similar transmission setups. For more details on this modeling
16-
technique refer to [BB17b] or [TT+12]. The actual results in [BB17a], [BB17b], [BB17c] and [BKB19] were computed using MATLAB.
16+
technique refer to [Bru24]. The actual results in [BB17a], [BB17b], [BB17c] and [BKB19] were computed using MATLAB.
1717
`LayerModel_lib` is a Python implementation of the same functionality.
1818

1919
The results from [BB19] were simulated using this library and the resulting data
@@ -23,8 +23,8 @@ can be found in int/in-body/ismict2019>.
2323
This code is distributed under [MIT license](LICENSE). When using this code or parts of it for publications or research
2424
please cite this repository as:
2525

26-
[Bru19] J.-C. Brumm, "LayerModel_lib. A Python toolkit to compute the transmission behaviour of plane
27-
electromagnetic waves through human tissue." DOI: 10.5281/zenodo.3507610
26+
[Bru23] J.-C. Brumm, "LayerModel_lib. A Python toolkit to compute the transmission behaviour of plane
27+
electromagnetic waves through human tissue." DOI: 10.5281/zenodo.10459541
2828

2929
## Installation and Requirements
3030
1. Download and install at least Python 3.6
@@ -80,6 +80,9 @@ More examples can be found in the [examples](examples/README.md) folder.
8080

8181
## References
8282

83+
[Bru24] J.-C. Brumm, "Channel Modeling and Performance Analysis of Ultra Wideband In-Body Communication",
84+
PhD thesis, TU Hamburg, 2024, https://doi.org/10.15480/882.9047
85+
8386
[BB19] J.-C. Brumm, and G. Bauch, “Influence of Physiological Properties on the
8487
Channel Capacity for Ultra Wideband In-Body Communication,” in *13th International Symposium on Medical
8588
Information and Communication Technology (ISMICT'2019)*. Oslo, 2019.

0 commit comments

Comments
 (0)