Alternative R package for SimpleITK

I'm following along with the book Deep Learning with PyTorch. On page 263, they try to load in the LUNA16 CT scan data using the python package SimpleITK. Unfortunately this package isn't available in R for Windows users.

Would anyone be able to suggest an alternate library that I could use? They say the data is in the MetaIO format, and each scan comes with 2 files - one .mhd (metadata) and one .raw (coordinates).

Sorry if I haven't provided enough information - I'm trying to understand the data and code myself as I go along with the book!

This is their code:

import SimpleITK as sitk
# ... line 83
class Ct:
  def __init__(self, series_uid):
    mhd_path = glob.glob(
    ct_mhd = sitk.ReadImage(mhd_path)
    ct_a = np.array(sitk.GetArrayFromImage(ct_mhd), dtype=np.float32)

An R version in development


I did see this, but the website says "R binaries are currently only available for Linux and Mac". And as I mentioned before, I use Windows... Or have I missed something??

The link posted is for an R interface to the SimpleTK library. Currently, Python binaries are available on Microsoft Windows, and you might have an easier time following the book in that language (or you can run under R using {reticulate}, but that adds a layer of complexity. You can also install from source.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.