Skip to content

Commit

Permalink
Correct issue convert to rtstruct with rt_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
pchlap committed Jul 26, 2021
1 parent 1f585ab commit ca28822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

$.dcm binary
*.tar.gz binary
*.png binary
*.ttf binary
*.woff binary

*.ipynb filter=nbstripout
*.ipynb diff=ipynb
2 changes: 1 addition & 1 deletion platipy/dicom/io/nifti_to_rtstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def convert_nifti(dcm_path, mask_input, output_file, color_map=cm.get_cmap("rain
mask = sitk.ReadImage(str(mask))

bool_arr = sitk.GetArrayFromImage(mask) != 0
bool_arr = np.transpose(bool_arr, (2, 1, 0))
bool_arr = np.transpose(bool_arr, (1, 2, 0))
rtstruct.add_roi(mask=bool_arr, color=color, name=mask_name)

rtstruct.save(str(output_file))

0 comments on commit ca28822

Please sign in to comment.