xcp_d.utils.atlas.copy_atlas

xcp_d.utils.atlas.copy_atlas(name_source, in_file, output_dir, atlas)[source]

Copy atlas file to output directory.

I can’t use DerivativesDataSink because it has a problem with dlabel CIFTI files. It gives the following error: “AttributeError: ‘Cifti2Header’ object has no attribute ‘set_data_dtype’”

I can’t override the CIFTI atlas’s data dtype ahead of time because setting it to int8 or int16 somehow converts all of the values in the data array to weird floats. This could be a version-specific nibabel issue.