|
| 1 | +""" |
| 2 | +cardiotensor — 3D cardiomyocyte orientation analysis from volumetric imaging. |
| 3 | +
|
| 4 | +Core usage |
| 5 | +---------- |
| 6 | +>>> from cardiotensor import compute_orientation, DataReader |
| 7 | +>>> reader = DataReader("path/to/images") |
| 8 | +>>> compute_orientation("path/to/images", output_dir="output", sigma=3.0, rho=1.0) |
| 9 | +
|
| 10 | +Sub-module imports |
| 11 | +------------------ |
| 12 | +For tractography:: |
| 13 | +
|
| 14 | + from cardiotensor.tractography import ( |
| 15 | + generate_streamlines_from_vector_field, |
| 16 | + generate_streamlines_from_params, |
| 17 | + ) |
| 18 | +
|
| 19 | +For I/O utilities:: |
| 20 | +
|
| 21 | + from cardiotensor.utils import ( |
| 22 | + read_conf_file, |
| 23 | + load_npz_streamlines, |
| 24 | + load_trk_streamlines, |
| 25 | + write_spatialgraph_am, |
| 26 | + export_vector_field_to_vtk, |
| 27 | + ) |
| 28 | +
|
| 29 | +For analysis:: |
| 30 | +
|
| 31 | + from cardiotensor.analysis import calculate_intensities, find_end_points |
| 32 | +
|
| 33 | +For visualization (requires a display):: |
| 34 | +
|
| 35 | + from cardiotensor.visualization import visualize_streamlines, visualize_vector_field |
| 36 | +""" |
| 37 | + |
| 38 | +# --- Core --- |
| 39 | +from cardiotensor.orientation.orientation_computation_pipeline import compute_orientation |
| 40 | +from cardiotensor.utils.DataReader import DataReader |
| 41 | +from cardiotensor.utils.utils import convert_to_8bit, read_conf_file |
| 42 | + |
| 43 | +# --- Orientation --- |
| 44 | +from cardiotensor.orientation.orientation_computation_functions import ( |
| 45 | + calculate_structure_tensor, |
| 46 | + compute_fraction_anisotropy, |
| 47 | + compute_helix_and_transverse_angles, |
| 48 | +) |
| 49 | + |
| 50 | +# --- Tractography --- |
| 51 | +from cardiotensor.tractography.generate_streamlines import ( |
| 52 | + generate_streamlines_from_params, |
| 53 | + generate_streamlines_from_vector_field, |
| 54 | +) |
| 55 | + |
| 56 | +# --- I/O --- |
| 57 | +from cardiotensor.utils.am_utils import write_spatialgraph_am |
| 58 | +from cardiotensor.utils.streamlines_io_utils import ( |
| 59 | + load_npz_streamlines, |
| 60 | + load_trk_streamlines, |
| 61 | +) |
| 62 | +from cardiotensor.utils.vector_vtk_export import export_vector_field_to_vtk |
| 63 | + |
| 64 | +# --- Analysis --- |
| 65 | +from cardiotensor.analysis.analysis_functions import ( |
| 66 | + calculate_intensities, |
| 67 | + find_end_points, |
| 68 | + save_intensity, |
| 69 | +) |
| 70 | + |
| 71 | +__all__ = [ |
| 72 | + # Core |
| 73 | + "compute_orientation", |
| 74 | + "DataReader", |
| 75 | + "read_conf_file", |
| 76 | + "convert_to_8bit", |
| 77 | + # Orientation |
| 78 | + "calculate_structure_tensor", |
| 79 | + "compute_fraction_anisotropy", |
| 80 | + "compute_helix_and_transverse_angles", |
| 81 | + # Tractography |
| 82 | + "generate_streamlines_from_vector_field", |
| 83 | + "generate_streamlines_from_params", |
| 84 | + # I/O |
| 85 | + "write_spatialgraph_am", |
| 86 | + "load_npz_streamlines", |
| 87 | + "load_trk_streamlines", |
| 88 | + "export_vector_field_to_vtk", |
| 89 | + # Analysis |
| 90 | + "calculate_intensities", |
| 91 | + "find_end_points", |
| 92 | + "save_intensity", |
| 93 | +] |
0 commit comments