diff --git a/README.md b/README.md index 8473b81d5c4bad23619df9f3d7a9ccb9a603cc9b..c19e28d11287dad69238bcb7db080581541d6988 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ def get_projection_validator(json_suffix: str = "*.json") -> Validator: return Validator(Path(__file__).parent / Path("projection.json"), json_suffix) -def projection_geometry_cli(): +def projection_cli(): parser = argparse.ArgumentParser( description="JSON THD Projection Geometry Validator CLI with uv." ) @@ -122,7 +122,7 @@ def projection_geometry_cli(): if __name__ == "__main__": - projection_geometry_cli() + projection_cli() ``` - add the CLI script to the `pyproject.toml` diff --git a/examples/artist/projection.json b/examples/artist/projection.json deleted file mode 100644 index 9c04612b6cd3c4a40ccd4c4941745ded1f45ebb0..0000000000000000000000000000000000000000 --- a/examples/artist/projection.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "header": - { - "uuid": "b83d81a1-333f-448e-af75-7c7db317fd96", - "timestamp": "2018-11-13T20:20:39+00:00" - }, - "image": - { - "uuid": "b83d81a1-333f-448e-af75-7c7db317fd96", - "timestamp": "2018-11-13T20:20:39+00:00", - "image_path": "test_thd.tif" - }, - "projection_geometry":{ - "focal_spot_position_mm": [ - -10.0, - -10.0, - -10.0 - ], - "focal_spot_orientation_quat": [ - 0.0, - 0.0, - 0.0, - 1.0 - ], - "detector_center_position_mm": [ - 990.0, - -10.0, - -10.0 - ], - "detector_center_orientation_quat": [ - 0.0, - 0.7071067811865475, - 0.0, - 0.7071067811865477 - ] - }, - "detector": { - "image_width_px": 2000, - "pixel_pitch_width_mm": 0.13899999856948853, - "image_height_px": 1800, - "pixel_pitch_height_mm": 0.13899999856948853 - } -} \ No newline at end of file diff --git a/examples/artist/projection.tif b/examples/artist/projection.tif deleted file mode 100644 index c5cb78ec1858f9013467d3ea4ca0d4d2bfe673c7..0000000000000000000000000000000000000000 Binary files a/examples/artist/projection.tif and /dev/null differ diff --git a/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.json b/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.json new file mode 100644 index 0000000000000000000000000000000000000000..0561b7c403dca2fa1cd7bb2b995f9afe1eee50a0 --- /dev/null +++ b/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.json @@ -0,0 +1,41 @@ +{ + "projection_geometry": { + "focal_spot_position_mm": [ + 10.0, + -129.0, + 199.39999389648438 + ], + "focal_spot_orientation_quat": [ + 0.06507049832935205, + 0.6191044363233372, + -0.08180482797651353, + 0.7783209474835338 + ], + "detector_center_position_mm": [ + 0.0, + 0.0, + 0.0 + ], + "detector_center_orientation_quat": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "image": { + "uuid": "d58262dd-a6b2-11ef-a41a-f46d3febaf33", + "timestamp": "2024-11-19 20:14:08.825622", + "image_path": "d58262dd-a6b2-11ef-a41a-f46d3febaf33.tif" + }, + "detector": { + "image_width_px": 1000, + "pixel_pitch_width_mm": 0.10000000149011612, + "image_height_px": 1000, + "pixel_pitch_height_mm": 0.15000000596046448 + }, + "header": { + "uuid": "d58262dd-a6b2-11ef-a41a-f46d3febaf33", + "timestamp": "2024-11-19 20:14:08.825622" + } +} \ No newline at end of file diff --git a/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.tif b/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.tif new file mode 100644 index 0000000000000000000000000000000000000000..eaf91afd61c62f6366edd379fdda5246063e69f6 Binary files /dev/null and b/examples/artist/projection_d58262dd-a6b2-11ef-a41a-f46d3febaf33.tif differ diff --git a/src/thd_json/projection/__init__.py b/src/thd_json/projection/__init__.py index 071e623aa5d872034e58c9dcbd205c4cebcdea7a..dae8dfa51f5b18cb724499a380d74da144a859ef 100644 --- a/src/thd_json/projection/__init__.py +++ b/src/thd_json/projection/__init__.py @@ -8,7 +8,7 @@ def get_projection_validator(json_suffix: str = "*.json") -> Validator: return Validator(Path(__file__).parent / Path("projection.json"), json_suffix) -def projection_geometry_cli(): +def projection_cli(): parser = argparse.ArgumentParser( description="JSON THD Projection Geometry Validator CLI with uv." ) @@ -32,4 +32,4 @@ def projection_geometry_cli(): if __name__ == "__main__": - projection_geometry_cli() + projection_cli()