Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading data? #7

Open
markemus opened this issue Nov 7, 2018 · 2 comments
Open

Loading data? #7

markemus opened this issue Nov 7, 2018 · 2 comments

Comments

@markemus
Copy link

markemus commented Nov 7, 2018

Hi @hsokooti I'm having trouble figuring out how to preprocess and load data into the net. I saw your post linking some datasets, but the model seems to load *.mha files and they all seem to be in other formats. Additionally, I'm not sure where to put the data in the directory structure; the documentation seems to be outdated and the setting["DLFolder"] key doesn't exist anymore.

@hsokooti
Copy link
Owner

hsokooti commented Nov 7, 2018

Dear markemus,

I updated the documentation. About the extension, you can define it for your own database in the setting_utils.py. For example, in line 88, this is defined for the DIR-Lab_4D:

    elif selected_data == 'DIR-Lab_4D':
        data_setting['Dim'] = '3D'
        data_setting['ext'] = '.mha'
        data_setting['imageByte'] = 2              # equals to sitk.sitkInt16 , we prefer not to import sitk in SettingUtils
        data_setting['types'] = ['T00', 'T10', 'T20', 'T30', 'T40', 'T50', 'T60', 'T70', 'T80', 'T90']     # for eg: 'Fixed' or 'Moving' : actually Fixed indicates baseline and Moving indicates followup
        data_setting['expPrefix'] = 'case'         # for eg: case1
        data_setting['defaultPixelValue'] = -2048  # The pixel value when a transformed pixel is outside of the image
        data_setting['voxelSize'] = [1, 1, 1]
        data_setting['AffineRegistration'] = True
        data_setting['UnsureLandmarkAvailable'] = False
        data_setting['CNList'] = [i for i in range(1, 11)]

To check all addresses, I suggest running and testing the following line:

original_image_address = su.address_generator(setting, 'originalIm', data='DIR-Lab_4D', cn=1, type_im=0, stage=1)

I hope that this can help.

@markemus
Copy link
Author

markemus commented Nov 8, 2018

Very helpful, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants