I've been trying to use the module to read some .fdf files that I have but was getting errors regarding value type. After much debugging I realized that the problem is with the headers. For some reason, each line in the header ends with a carriage return and a new line, i.e. \r\n. So when they are parsed and tokenized, there are now 5 tokens, the last being the \r. The code that reads the header then ignores each line as it only looks at lines with exactly 4 items after tokenization. I confirmed that adding the line "line = RemoveCharacters(line, '\r');" [here] (
|
line = RemoveCharacters(line, '*'); |
|
line = RemoveCharacters(line, '\"'); |
|
line = RemoveCharacters(line, '['); |
|
line = RemoveCharacters(line, ']'); |
) resolves the issue, so I was hoping you could make that fix. I could submit a PR if you would prefer that.
I've been trying to use the module to read some .fdf files that I have but was getting errors regarding value type. After much debugging I realized that the problem is with the headers. For some reason, each line in the header ends with a carriage return and a new line, i.e. \r\n. So when they are parsed and tokenized, there are now 5 tokens, the last being the \r. The code that reads the header then ignores each line as it only looks at lines with exactly 4 items after tokenization. I confirmed that adding the line "line = RemoveCharacters(line, '\r');" [here] (
ITKIOFDF/src/itkFDFCommonImageIO.cxx
Lines 55 to 58 in 386ac6d