In [ ]:
import numpy as np
import lisa.volumetry_evaluation
In [ ]:
In [ ]:
data1 = np.zeros([10, 10, 10])
data2 = np.zeros([10, 10, 10])
data1[2:6, 2:6, 2:6] = 1
data2[4:8, 2:8, 2:8] = 1
data2[1:8, 5, 5] = 1
In [ ]:
lisa.volumetry_evaluation.compare_volumes(data1, data2, voxelsize_mm=[1,1,1])
In [ ]:
lisa.volumetry_evaluation.compare_volumes_sliver(data1, data2, voxelsize_mm=[1,1,1])
In [ ]:
import os.path as op
import io3d.datasets
input_annotation_file = op.join("tests", "test_dwv_jatra_5mm.json")
input_data_path = io3d.datasets.join_path("jatra_5mm/")
oseg = lisa.organ_segmentation.OrganSegmentation(
input_annotation_file=input_annotation_file,
datapath=input_data_path,
output_annotation_file="output.json",
autocrop=False,
)
oseg.make_run()
oseg.data3d
oseg.segmentation
oseg.sliver_compare_with_other_volume_from_file("file.pklz")