Skip to content

Commit 0ec1211

Browse files
updated readme
1 parent ae4da9a commit 0ec1211

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,25 @@ pip install deepdrr
1717

1818
## Usage
1919

20-
DeepDRR is designed to be simple to use. The following minimal example loads a CT volume from a NifTi `.nii.gz` file and simulates X-ray projection of the IJK point [100, 100, 100]:
20+
The following minimal example loads a CT volume from a NifTi `.nii.gz` file and simulates an X-ray projection:
2121

2222
```python
23-
import deepdrr
23+
from deepdrr import geo, Volume, MobileCArm, Projector
2424

25-
volume = deepdrr.Volume.from_nifti('/path/to/ct_image.nii.gz')
26-
camera_intrinsics = deepdrr.geo.CameraIntrinsicTransform.from_sizes(
27-
sensor_size=512,
28-
pixel_size=0.33,
29-
source_to_detector_distance=1200,
30-
)
25+
volume = Volume.from_nifti('/path/to/ct_image.nii.gz')
26+
carm = MobileCArm()
27+
carm.reposition(volume.center_in_world)
3128

32-
33-
center = volume.world_from_ijk @ deepdrr.geo.point(100, 100, 100)
34-
carm = deepdrr.CArm(isocenter=center, isocenter_distance=800)
35-
36-
with deepdrr.Projector(volume, camera_intrinsics, carm) as projector:
37-
projection = projector()
29+
with Projector(volume, camera_intrinsics, carm) as projector:
30+
carm.move_to(alpha=30, beta=10, degrees=True)
31+
projection = projector()
3832
```
3933

40-
A more detailed example script is given in `example_projector.py`. This script contains a typical use-case for projecting over a volume.
41-
42-
## Documentation
43-
44-
Documentation is available at [deepdrr.readthedocs.io](https://deepdrr.readthedocs.io).
34+
The script `example_projector.py` gives an alternative example. Additional tutorials are in progress at [deepdrr.readthedocs.io](https://deepdrr.readthedocs.io). Contributions are welcome.
4535

4636
## Contributing
4737

48-
Contributions are welcome. Please make a pull request.
38+
Contributions for bug fixes, enhancements, and other suggestions are welcome. Please make a pull request.
4939

5040
## Method Overview
5141

0 commit comments

Comments
 (0)