Skip to content

Commit 430f551

Browse files
committed
Revert "Remove scikit-video dependency (#6)"
This reverts commit f292ab8.
1 parent f292ab8 commit 430f551

File tree

14 files changed

+131
-955
lines changed

14 files changed

+131
-955
lines changed

CMakeLists.txt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,6 @@ find_package( LibCarna "3.4.0" REQUIRED COMPONENTS release )
8181
include_directories( ${LibCarna_INCLUDE_DIR} )
8282
set( LIBCARNA_VERSION ${FOUND_VERSION} )
8383

84-
############################################
85-
# Macro that sets variable to default value
86-
# only when the variable isn't defined yet
87-
############################################
88-
89-
macro( copy_python_aux_files mod_path )
90-
file( GLOB PYTHON_AUX_FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/${mod_path}/*.py" )
91-
file( COPY ${PYTHON_AUX_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${mod_path}" )
92-
endmacro()
93-
9484
############################################
9585

9686
configure_file(
@@ -105,17 +95,13 @@ configure_file(
10595
@ONLY
10696
)
10797

108-
copy_python_aux_files( "${PYTHON_MODULE_NAME}" )
109-
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs" )
110-
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo" )
111-
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo/io" )
112-
copy_python_aux_files( "${PYTHON_MODULE_NAME}/libs/skvideo/utils" )
98+
file( GLOB PYTHON_AUX_FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/libcarna/*.py" )
99+
file( COPY ${PYTHON_AUX_FILES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_MODULE_NAME}" )
113100

114101
file( GLOB LICENSES "${LibCarna_LICENSE_DIR}/LICENSE*" )
115102
file( COPY ${LICENSES} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
116103
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/README.md DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
117104
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
118-
file( COPY ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE-skvideo DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" )
119105

120106
############################################
121107
# Project

LICENSE-skvideo

Lines changed: 0 additions & 32 deletions
This file was deleted.

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies:
2828
- libcarna ==3.4.0
2929
- matplotlib-base # for `_colormap_helper`
3030
- numpngw ==0.1.4 # writes APNG
31+
- scikit-video ==1.1.11 # API for ffmpeg
3132
- ffmpeg # writes h264
3233
- scipy # for `libcarna.data` and `libcarna.normalize_hounsfield_units`
3334
- scikit-image # for `libcarna.data`

examples/cells.ipynb

Lines changed: 55 additions & 55 deletions
Large diffs are not rendered by default.

examples/cthead.ipynb

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

examples/introduction.ipynb

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"id": "3bf7058d",
1515
"metadata": {
1616
"execution": {
17-
"iopub.execute_input": "2025-05-15T21:27:31.292087Z",
18-
"iopub.status.busy": "2025-05-15T21:27:31.291928Z",
19-
"iopub.status.idle": "2025-05-15T21:27:31.692969Z",
20-
"shell.execute_reply": "2025-05-15T21:27:31.692413Z"
17+
"iopub.execute_input": "2025-05-13T11:30:37.159368Z",
18+
"iopub.status.busy": "2025-05-13T11:30:37.159210Z",
19+
"iopub.status.idle": "2025-05-13T11:30:37.733839Z",
20+
"shell.execute_reply": "2025-05-13T11:30:37.733418Z"
2121
},
2222
"vscode": {
2323
"languageId": "plaintext"
@@ -52,10 +52,10 @@
5252
"id": "cd38b675",
5353
"metadata": {
5454
"execution": {
55-
"iopub.execute_input": "2025-05-15T21:27:31.694352Z",
56-
"iopub.status.busy": "2025-05-15T21:27:31.694173Z",
57-
"iopub.status.idle": "2025-05-15T21:27:31.696537Z",
58-
"shell.execute_reply": "2025-05-15T21:27:31.696148Z"
55+
"iopub.execute_input": "2025-05-13T11:30:37.735613Z",
56+
"iopub.status.busy": "2025-05-13T11:30:37.735453Z",
57+
"iopub.status.idle": "2025-05-13T11:30:37.737396Z",
58+
"shell.execute_reply": "2025-05-13T11:30:37.737148Z"
5959
},
6060
"vscode": {
6161
"languageId": "plaintext"
@@ -84,10 +84,10 @@
8484
"id": "8518d1b2",
8585
"metadata": {
8686
"execution": {
87-
"iopub.execute_input": "2025-05-15T21:27:31.697706Z",
88-
"iopub.status.busy": "2025-05-15T21:27:31.697602Z",
89-
"iopub.status.idle": "2025-05-15T21:27:31.699966Z",
90-
"shell.execute_reply": "2025-05-15T21:27:31.699586Z"
87+
"iopub.execute_input": "2025-05-13T11:30:37.738879Z",
88+
"iopub.status.busy": "2025-05-13T11:30:37.738781Z",
89+
"iopub.status.idle": "2025-05-13T11:30:37.740641Z",
90+
"shell.execute_reply": "2025-05-13T11:30:37.740403Z"
9191
},
9292
"vscode": {
9393
"languageId": "plaintext"
@@ -120,10 +120,10 @@
120120
"id": "df9403bf",
121121
"metadata": {
122122
"execution": {
123-
"iopub.execute_input": "2025-05-15T21:27:31.701092Z",
124-
"iopub.status.busy": "2025-05-15T21:27:31.700980Z",
125-
"iopub.status.idle": "2025-05-15T21:27:31.705588Z",
126-
"shell.execute_reply": "2025-05-15T21:27:31.705204Z"
123+
"iopub.execute_input": "2025-05-13T11:30:37.742124Z",
124+
"iopub.status.busy": "2025-05-13T11:30:37.742021Z",
125+
"iopub.status.idle": "2025-05-13T11:30:37.746048Z",
126+
"shell.execute_reply": "2025-05-13T11:30:37.745798Z"
127127
},
128128
"vscode": {
129129
"languageId": "plaintext"
@@ -133,7 +133,7 @@
133133
{
134134
"data": {
135135
"text/plain": [
136-
"<libcarna._spatial.geometry.<locals>.Geometry at 0x79040f1b1df0>"
136+
"<libcarna._spatial.geometry.<locals>.Geometry at 0x7c02b5141eb0>"
137137
]
138138
},
139139
"execution_count": 4,
@@ -182,10 +182,10 @@
182182
"id": "4a1a1c31",
183183
"metadata": {
184184
"execution": {
185-
"iopub.execute_input": "2025-05-15T21:27:31.706696Z",
186-
"iopub.status.busy": "2025-05-15T21:27:31.706593Z",
187-
"iopub.status.idle": "2025-05-15T21:27:31.708834Z",
188-
"shell.execute_reply": "2025-05-15T21:27:31.708452Z"
185+
"iopub.execute_input": "2025-05-13T11:30:37.747577Z",
186+
"iopub.status.busy": "2025-05-13T11:30:37.747480Z",
187+
"iopub.status.idle": "2025-05-13T11:30:37.749306Z",
188+
"shell.execute_reply": "2025-05-13T11:30:37.749077Z"
189189
},
190190
"vscode": {
191191
"languageId": "plaintext"
@@ -221,10 +221,10 @@
221221
"id": "0ca491a8",
222222
"metadata": {
223223
"execution": {
224-
"iopub.execute_input": "2025-05-15T21:27:31.709922Z",
225-
"iopub.status.busy": "2025-05-15T21:27:31.709820Z",
226-
"iopub.status.idle": "2025-05-15T21:27:31.782437Z",
227-
"shell.execute_reply": "2025-05-15T21:27:31.782093Z"
224+
"iopub.execute_input": "2025-05-13T11:30:37.750878Z",
225+
"iopub.status.busy": "2025-05-13T11:30:37.750675Z",
226+
"iopub.status.idle": "2025-05-13T11:30:37.833847Z",
227+
"shell.execute_reply": "2025-05-13T11:30:37.833433Z"
228228
},
229229
"vscode": {
230230
"languageId": "plaintext"
@@ -253,10 +253,10 @@
253253
"id": "37ff9c22",
254254
"metadata": {
255255
"execution": {
256-
"iopub.execute_input": "2025-05-15T21:27:31.783596Z",
257-
"iopub.status.busy": "2025-05-15T21:27:31.783489Z",
258-
"iopub.status.idle": "2025-05-15T21:27:31.876948Z",
259-
"shell.execute_reply": "2025-05-15T21:27:31.876528Z"
256+
"iopub.execute_input": "2025-05-13T11:30:37.835247Z",
257+
"iopub.status.busy": "2025-05-13T11:30:37.835139Z",
258+
"iopub.status.idle": "2025-05-13T11:30:37.931324Z",
259+
"shell.execute_reply": "2025-05-13T11:30:37.930910Z"
260260
},
261261
"vscode": {
262262
"languageId": "plaintext"
@@ -266,7 +266,7 @@
266266
{
267267
"data": {
268268
"text/plain": [
269-
"<matplotlib.image.AxesImage at 0x79040f09c050>"
269+
"<matplotlib.image.AxesImage at 0x7c02b4fff890>"
270270
]
271271
},
272272
"execution_count": 7,
@@ -307,10 +307,10 @@
307307
"id": "10ab7a0a",
308308
"metadata": {
309309
"execution": {
310-
"iopub.execute_input": "2025-05-15T21:27:31.878180Z",
311-
"iopub.status.busy": "2025-05-15T21:27:31.878061Z",
312-
"iopub.status.idle": "2025-05-15T21:27:32.032392Z",
313-
"shell.execute_reply": "2025-05-15T21:27:32.031942Z"
310+
"iopub.execute_input": "2025-05-13T11:30:37.932674Z",
311+
"iopub.status.busy": "2025-05-13T11:30:37.932571Z",
312+
"iopub.status.idle": "2025-05-13T11:30:38.079719Z",
313+
"shell.execute_reply": "2025-05-13T11:30:38.079276Z"
314314
},
315315
"vscode": {
316316
"languageId": "plaintext"
@@ -373,7 +373,7 @@
373373
"name": "python",
374374
"nbconvert_exporter": "python",
375375
"pygments_lexer": "ipython3",
376-
"version": "3.13.3"
376+
"version": "3.12.10"
377377
}
378378
},
379379
"nbformat": 4,

misc/libcarna/_imshow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import numpngw
1010
import numpy as np
11-
from .libs.skvideo import io as skvideo_io
11+
import skvideo.io
1212

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

4848
# Encode video
4949
with tempfile.NamedTemporaryFile(suffix='.mp4') as mp4_file:
50-
with skvideo_io.FFmpegWriter(
50+
with skvideo.io.FFmpegWriter(
5151
mp4_file.name,
5252
outputdict={
5353
'-vcodec': 'h264',

misc/libcarna/libs/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)