nipy / heudiconv

Flexible DICOM conversion into structured directory layouts
https://heudiconv.readthedocs.io
Other
235 stars 125 forks source link

automate heudiconv #233

Closed relyativist closed 5 years ago

relyativist commented 6 years ago

I will try to point an issue on example:

First i run docker hediconv with flag convertall-> get dicominfo.tsv and manually extract parameters from .tsv to heuristic.
2)Then i compose heursitic.py for 1 subject(because dcm comes every 1 week)
excellent: BIDS validated
My question : Is it possible to use heudiconv to automatically (on 1 step) composing a heuristic for depending on all incoming dcm?
relyativist commented 6 years ago

Can’ t believe that nobody faces the same problem...

yarikoptic commented 6 years ago

The whole workflow in mind you have is not clear to me... you said that "i compose heursitic.py for 1 subject" -- as soon as you have a heuristic, you could use it for other subjects. So it wouldn't be "heudiconv to automatically (on 1 step) composing a heuristic ". "all incoming dcm" could vary so wildly that besides may be determining modality (anat/func) it would be hard to full deduce the file naming. So I guess you would need to provide more description of your "problem" here

relyativist commented 6 years ago

“...as soon as you have heuristic, you could use it for other subjects” - but if every subject have different Params in dicominfo.tsv, what I mean is there an “universal” heuristic py, not to compose it every time as dicom come in?

yarikoptic commented 6 years ago

you must not hardcode any subject specific information into your heuristic file, and as you can see from other heuristics, see e.g. https://github.com/nipy/heudiconv/blob/master/heudiconv/heuristics/uc_bids.py#L18 .

So if you provide converter -c dcm2niix if would at once use heuristic, create that dicominfo.tsv etc files, and proceed to conversion while possibly (depending on your heuristic) placing new files under new subject-specific locations.

relyativist commented 6 years ago

Good, could please point whole command for this “so if you provide converter -c dcm 2niix...”?

yarikoptic commented 6 years ago

actually I was wrong -- you do not even need -c dcm2niix any longer since it is the default now ;-) ! examples: can look at https://github.com/repronim/reproin#conversion

mgxd commented 5 years ago

@relyativist is this still an issue? If so, please re-open