NIRALUser / DTIPlayground

An integrated framework for DWI Image QC and processing
MIT License
12 stars 2 forks source link

dtiatlasbuilder: - no deformation fields folder in output folder #45

Closed styner closed 1 year ago

styner commented 1 year ago

The result CSV file DTIAtlasBuilderResults.csv has (in part) incorrect path names:

scalphunters commented 1 year ago

'Diffeomorphic Deformation field to Original space' has paths begin with /displacement_fields directory. Due to hierarchical nature of the build, final_atlas only contains the final result (atlas) and displacement to the immediate children. I don't know why you don't have displacement_fields directory (inexisting?), but it should be there.

Other node (each subject's longitudinal images)'s results are used in the immediate parent, this means /atlases cannot be handled generally.

I might not fully understand what you mean, but putting all the information to final_atlas ( such as concatenated deformation fields) is not the way the software works with hierarchical setup.

Pls clarify if I have some misunderstanding.

styner commented 1 year ago

Yeah, I have no folder called displacement_fields in my output directory, so that's where things went wrong. So, the issue is really, the atlas builder did not create the displacement field. here is the listing for the output folder:

(base) [styner@c1416ood02 dmriplayground_0.5.9b9]$ ls -l total 2949 drwxr-xr-x 2 styner its_graduate_psx 4096 Mar 21 13:48 common -rw-r--r-- 1 styner its_graduate_psx 234910 Mar 21 23:14 DTIAtlasBuilderResults.csv drwxr-xr-x 2 styner its_graduate_psx 4096 Mar 21 22:49 final_atlas -rw-r--r-- 1 styner its_graduate_psx 2784115 Mar 21 23:14 log.txt

scalphunters commented 1 year ago

it is strange, can you give your output directory path? seems like atlases directory is also missing.

styner commented 1 year ago

Well, I deleted the atlases directory to save space (as it only contains intermediate information, everything needed is in the final_atlas folder). But, I did not delete the deformation_fields folder.

styner commented 1 year ago

When I ran it, I did so on the local cluster and it ran out of time on the first run and then continued running with the second run on the same output folder (with overwrite disabled so it would not recompute steps that had already been computed).

styner commented 1 year ago

Extending this topic a bit further. Looking at the output/result csv. Several of the paths point to the "atlases" folder which contains intermediate data. Not really a bug, but those paths should be pointing to the final_atlas or the displacement_fields folder, as I expect most users to remove the "atlases" folder to save space.

scalphunters commented 1 year ago

I think there was some misunderstanding. if you want to track down all the paths and related files. you should leave atlases directory. 'final_atlas' directory is just a duplicate for your convenience in case you just need final atlas. it is also in atlases directory. I'd rather delete final_atlas directory and use csv files i/o deleting altases directory in that case. 'displacement_fields' directory is a post-process that uses 'atlases' directory's information. If hierarchical build structure is desired, manual handling of csv file is not very recommended since the data structure is tree and it uses recursion algorithm mostly.

scalphunters commented 1 year ago

I've tested several times with test images and displacement_fields are generated. If you experience this case again pls let me know. I'll close this issue in some days if no further problem happens.