qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
181 stars 56 forks source link

path_length #71

Closed FabienRech closed 1 year ago

FabienRech commented 1 year ago

Hi, I was wondering if there is a potential limit to the length of the path directory used by the RTStrcuctBuilder.create_from() ?

I have created a script which was working well but as I lauched it on a new computer (and adapted the path) it did not work...I had no space or special caractere in my path.

The only solution I have found was to change the path by reducing it a little bit ?

Do you have an explanation ?

Best

Fabien

awtkns commented 1 year ago

HI @FabienRech, I have run into this issue before when working with dicom structures. Assuming you are using windows there is limitation of 260 characters the path length in the files systems. More details can be found here.

The Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\some 256-character path string" where "" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)

This the is no restriction in RT-utils on path length. @asim-shrestha I believe this can be closed

FabienRech commented 1 year ago

Thank you, Finally I think I likely did a mistake in one character (inversion of two characters - the devils is in the details) , despite multiple checking in the path....