Skip to content

Commit

Permalink
Merge with master
Browse files Browse the repository at this point in the history
  • Loading branch information
pjarosik committed Dec 23, 2021
2 parents 9a314f6 + 3a48688 commit 08d2569
Show file tree
Hide file tree
Showing 20 changed files with 657 additions and 150 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ set(ARRUS_PYTHON_INSTALL_DIR python)
set(Us4_LIB_DIR ${Us4_ROOT_DIR}/lib64)

option(ARRUS_BUILD_PY "Build python API." OFF)
set(ARRUS_PY_VERSION "3.8" CACHE STRING "Python version for which the ARRUS package should be built.")
option(ARRUS_BUILD_MATLAB "Build MATLAB API." OFF)
option(ARRUS_BUILD_DOCS "Build documentation." OFF)
option(ARRUS_RUN_TESTS "Run all tests builded packages." OFF)
Expand Down Expand Up @@ -87,7 +88,7 @@ set(ARRUS_DOCS_INSTALL_DIR docs)
################################################################################
# Common dependencies
################################################################################
find_package(Us4 0.6.8 EXACT REQUIRED US4OEM HV256 DBARLite)
find_package(Us4 0.6.9 EXACT REQUIRED US4OEM HV256 DBARLite)
find_package(Boost REQUIRED)
set(Boost_USE_STATIC_LIBS ON)
find_package(Protobuf REQUIRED)
Expand Down
5 changes: 3 additions & 2 deletions api/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
################################################################################
find_package(SWIG REQUIRED)
include(UseSWIG)
find_package(PythonInterp REQUIRED)
find_package(PythonLibs REQUIRED)
find_package(PythonInterp ${ARRUS_PY_VERSION} REQUIRED)
find_package(PythonLibs ${ARRUS_PY_VERSION} REQUIRED)
set_property(SOURCE wrappers/core.i PROPERTY CPLUSPLUS ON)
if (MSVC)
set_property(
Expand Down Expand Up @@ -198,6 +198,7 @@ install(
examples/diverging_beams.py
examples/custom_tx_rx_sequence.py
examples/custom_callback.py
examples/phased_array_scanning.py
examples/requirements.txt
examples/requirements.txt
DESTINATION
Expand Down
4 changes: 2 additions & 2 deletions api/python/arrus/devices/us4r.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import ctypes
import collections.abc

import arrus.utils.core
import arrus.logging
from arrus.devices.device import Device, DeviceId, DeviceType
import arrus.exceptions
import arrus.devices.probe
Expand Down Expand Up @@ -112,6 +110,7 @@ def get_probe_model(self):
"""
Returns probe model description.
"""
import arrus.utils.core
return arrus.utils.core.convert_to_py_probe_model(
core_model=self._handle.getProbe(0).getModel())

Expand All @@ -123,6 +122,7 @@ def set_test_pattern(self, pattern):
self._handle.setTestPattern(test_pattern_core)

def _get_dto(self):
import arrus.utils.core
probe_model = arrus.utils.core.convert_to_py_probe_model(
core_model=self._handle.getProbe(0).getModel())
probe_dto = arrus.devices.probe.ProbeDTO(model=probe_model)
Expand Down
1 change: 0 additions & 1 deletion api/python/arrus/ops/imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def __post_init__(self):
super().__post_init__()
if self.tx_focus <= 0 or np.isinf(self.tx_focus):
raise ValueError("TX focus has to be a positive value.")
assert_is_scalar("angles", self.angles)


@dataclasses.dataclass(frozen=True)
Expand Down
Loading

0 comments on commit 08d2569

Please sign in to comment.