Skip to content

Instantly share code, notes, and snippets.

@thewtex
thewtex / itkwidgets-htj2k-demo.ipynb
Created October 19, 2023 16:17
htj2k python wasm example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / hypha-client.ipynb
Last active June 9, 2023 16:05
AI4Life 2023 hackathon hypha remote render
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / itk-dask-blogpost.ipynb
Created March 3, 2023 12:43 — forked from GenevieveBuckley/itk-dask-blogpost.ipynb
ITK + Dask notebooks (August 2022)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / save_image_from_numpy_array_affine_matrix.py
Created August 9, 2021 21:55
Save an image from a numpy array and an affine matrix
import itk
import numpy as np
def save(np_array: np.ndarray, filename: str, affine_matrix: np.ndarray):
# -1 for translation
Dimension = affine_matrix.shape[0] - 1
# Is this a multi-component image?
is_vector = np_array.ndim != Dimension
print('is_vector', is_vector)
@thewtex
thewtex / ImageChannelInterleavedContiguous.ipynb
Last active October 27, 2020 15:07
Demonstrate image channel interleaved vs contiguous in ITK / PIL / Matplotlib versus PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / Segmentation_Image_Distance.ipynb
Created August 10, 2020 17:05
Segmentation image distance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / AnisotropicSpacing.ipynb
Created June 21, 2020 03:56
X/Y/Z anisotropic voxel scaling possible with the itkwidgets.view function?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thewtex
thewtex / ContourExtractor2D.ipynb
Created June 10, 2020 02:28
itk.ContourExtractor2DImageFilter example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.