Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ find_package( LibCarna "3.4.0" REQUIRED COMPONENTS release )
include_directories( ${LibCarna_INCLUDE_DIR} )
set( LIBCARNA_VERSION ${FOUND_VERSION} )

############################################
# Macro that sets variable to default value
# only when the variable isn't defined yet
############################################

macro( copy_python_aux_files mod_path )
file( GLOB PYTHON_AUX_FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/${mod_path}/*.py" )
file( COPY ${PYTHON_AUX_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${mod_path}" )
endmacro()

############################################

configure_file(
Expand All @@ -105,17 +95,13 @@ configure_file(
@ONLY
)

copy_python_aux_files( "${PYTHON_MODULE_NAME}" )
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs" )
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo" )
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo/io" )
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo/utils" )
file( GLOB PYTHON_AUX_FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/libcarna/*.py" )
file( COPY ${PYTHON_AUX_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_MODULE_NAME}" )

file( GLOB LICENSES "${LibCarna_LICENSE_DIR}/LICENSE*" )
file( COPY ${LICENSES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/README.md DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE-skvideo DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )

############################################
# Project
Expand Down
32 changes: 0 additions & 32 deletions LICENSE-skvideo

This file was deleted.

1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- libcarna ==3.4.0
- matplotlib-base # for `_colormap_helper`
- numpngw ==0.1.4 # writes APNG
- scikit-video ==1.1.11 # API for ffmpeg
- ffmpeg # writes h264
- scipy # for `libcarna.data` and `libcarna.normalize_hounsfield_units`
- scikit-image # for `libcarna.data`
Expand Down
110 changes: 55 additions & 55 deletions examples/cells.ipynb

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions examples/cthead.ipynb

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions examples/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"id": "3bf7058d",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.292087Z",
"iopub.status.busy": "2025-05-15T21:27:31.291928Z",
"iopub.status.idle": "2025-05-15T21:27:31.692969Z",
"shell.execute_reply": "2025-05-15T21:27:31.692413Z"
"iopub.execute_input": "2025-05-13T11:30:37.159368Z",
"iopub.status.busy": "2025-05-13T11:30:37.159210Z",
"iopub.status.idle": "2025-05-13T11:30:37.733839Z",
"shell.execute_reply": "2025-05-13T11:30:37.733418Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -52,10 +52,10 @@
"id": "cd38b675",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.694352Z",
"iopub.status.busy": "2025-05-15T21:27:31.694173Z",
"iopub.status.idle": "2025-05-15T21:27:31.696537Z",
"shell.execute_reply": "2025-05-15T21:27:31.696148Z"
"iopub.execute_input": "2025-05-13T11:30:37.735613Z",
"iopub.status.busy": "2025-05-13T11:30:37.735453Z",
"iopub.status.idle": "2025-05-13T11:30:37.737396Z",
"shell.execute_reply": "2025-05-13T11:30:37.737148Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -84,10 +84,10 @@
"id": "8518d1b2",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.697706Z",
"iopub.status.busy": "2025-05-15T21:27:31.697602Z",
"iopub.status.idle": "2025-05-15T21:27:31.699966Z",
"shell.execute_reply": "2025-05-15T21:27:31.699586Z"
"iopub.execute_input": "2025-05-13T11:30:37.738879Z",
"iopub.status.busy": "2025-05-13T11:30:37.738781Z",
"iopub.status.idle": "2025-05-13T11:30:37.740641Z",
"shell.execute_reply": "2025-05-13T11:30:37.740403Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -120,10 +120,10 @@
"id": "df9403bf",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.701092Z",
"iopub.status.busy": "2025-05-15T21:27:31.700980Z",
"iopub.status.idle": "2025-05-15T21:27:31.705588Z",
"shell.execute_reply": "2025-05-15T21:27:31.705204Z"
"iopub.execute_input": "2025-05-13T11:30:37.742124Z",
"iopub.status.busy": "2025-05-13T11:30:37.742021Z",
"iopub.status.idle": "2025-05-13T11:30:37.746048Z",
"shell.execute_reply": "2025-05-13T11:30:37.745798Z"
},
"vscode": {
"languageId": "plaintext"
Expand All @@ -133,7 +133,7 @@
{
"data": {
"text/plain": [
"<libcarna._spatial.geometry.<locals>.Geometry at 0x79040f1b1df0>"
"<libcarna._spatial.geometry.<locals>.Geometry at 0x7c02b5141eb0>"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -182,10 +182,10 @@
"id": "4a1a1c31",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.706696Z",
"iopub.status.busy": "2025-05-15T21:27:31.706593Z",
"iopub.status.idle": "2025-05-15T21:27:31.708834Z",
"shell.execute_reply": "2025-05-15T21:27:31.708452Z"
"iopub.execute_input": "2025-05-13T11:30:37.747577Z",
"iopub.status.busy": "2025-05-13T11:30:37.747480Z",
"iopub.status.idle": "2025-05-13T11:30:37.749306Z",
"shell.execute_reply": "2025-05-13T11:30:37.749077Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -221,10 +221,10 @@
"id": "0ca491a8",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.709922Z",
"iopub.status.busy": "2025-05-15T21:27:31.709820Z",
"iopub.status.idle": "2025-05-15T21:27:31.782437Z",
"shell.execute_reply": "2025-05-15T21:27:31.782093Z"
"iopub.execute_input": "2025-05-13T11:30:37.750878Z",
"iopub.status.busy": "2025-05-13T11:30:37.750675Z",
"iopub.status.idle": "2025-05-13T11:30:37.833847Z",
"shell.execute_reply": "2025-05-13T11:30:37.833433Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -253,10 +253,10 @@
"id": "37ff9c22",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.783596Z",
"iopub.status.busy": "2025-05-15T21:27:31.783489Z",
"iopub.status.idle": "2025-05-15T21:27:31.876948Z",
"shell.execute_reply": "2025-05-15T21:27:31.876528Z"
"iopub.execute_input": "2025-05-13T11:30:37.835247Z",
"iopub.status.busy": "2025-05-13T11:30:37.835139Z",
"iopub.status.idle": "2025-05-13T11:30:37.931324Z",
"shell.execute_reply": "2025-05-13T11:30:37.930910Z"
},
"vscode": {
"languageId": "plaintext"
Expand All @@ -266,7 +266,7 @@
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x79040f09c050>"
"<matplotlib.image.AxesImage at 0x7c02b4fff890>"
]
},
"execution_count": 7,
Expand Down Expand Up @@ -307,10 +307,10 @@
"id": "10ab7a0a",
"metadata": {
"execution": {
"iopub.execute_input": "2025-05-15T21:27:31.878180Z",
"iopub.status.busy": "2025-05-15T21:27:31.878061Z",
"iopub.status.idle": "2025-05-15T21:27:32.032392Z",
"shell.execute_reply": "2025-05-15T21:27:32.031942Z"
"iopub.execute_input": "2025-05-13T11:30:37.932674Z",
"iopub.status.busy": "2025-05-13T11:30:37.932571Z",
"iopub.status.idle": "2025-05-13T11:30:38.079719Z",
"shell.execute_reply": "2025-05-13T11:30:38.079276Z"
},
"vscode": {
"languageId": "plaintext"
Expand Down Expand Up @@ -373,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.3"
"version": "3.12.10"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions misc/libcarna/_imshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import numpngw
import numpy as np
from .libs.skvideo import io as skvideo_io
import skvideo.io

try:
from IPython.core.display import HTML as IPythonHTML
Expand Down Expand Up @@ -47,7 +47,7 @@ def _render_html_h264(array: np.ndarray | Iterable[np.ndarray], fps: float = 25)

# Encode video
with tempfile.NamedTemporaryFile(suffix='.mp4') as mp4_file:
with skvideo_io.FFmpegWriter(
with skvideo.io.FFmpegWriter(
mp4_file.name,
outputdict={
'-vcodec': 'h264',
Expand Down
Empty file removed misc/libcarna/libs/__init__.py
Empty file.
Loading
Loading