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

starting toolkit using API problem #25

Open
anitakh1 opened this issue Oct 16, 2017 · 2 comments
Open

starting toolkit using API problem #25

anitakh1 opened this issue Oct 16, 2017 · 2 comments

Comments

@anitakh1
Copy link

when i write ' file_infos = PTKDicomUtilities.GetListOfDicomFiles(source_path);', it says 'Undefined variable "PTKDicomUtilities" or class PTKDicomUtilities.GetListOfDicomFiles". i defined file path in source_path. please help

@tomdoel
Copy link
Owner

tomdoel commented Oct 22, 2017

Hi. Thanks for reporting. Tutorial 3 is a bit out of date, so that command will no longer work.

The easiest thing to do is import the data using image_uids = ptk_main.ImportData(source_path);.
This will group your data into one or more contiguous volumes. This returns a cell array of UIDs, where each cell array element is a UID for that contiguous volume. Normally a single image series will return a single volume, so image_uids will contain just one UID.

To turn that volume into a Dataset object use
dataset = ptk_main.CreateDatasetFromUid(image_uids{1});

If image_uids contains more than one UID it means the data have grouped into more than one volume (e.g. you have imported multiple images, or there are scout or other images mixed in with the volume). In this case you can examine the different volumes returned by creating a Dataset object for each, such as dataset_2 = ptk_main.CreateDatasetFromUid(image_uids{2}); for the second one, and so on.

I think the rest of the tutorial should work.

@anitakh1
Copy link
Author

anitakh1 commented Oct 23, 2017 via email

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