Load table from txt format

Hi @lassoan,

what is the syntax for a table in txt format to be properly loaded?

For example I have this table https://www.dropbox.com/s/eqwrs03bohn4bs4/WEIN069_cat.txt?dl=0
and it will loaded as only one column (also in the case that I remove the first 4 lines).

Has the syntax to follow strict rules? and in that case is there anywhere some documentation or example that shows the syntax?

Or instead is it possible to give to the table reader which is the separator between columns, etc…?

Slicer supports tab separated values (.tsv) and comma separated values (.csv). Import your text file into a spreadsheet program using fixed-width columns, then save it as either a CSV or TSV.

2 Likes

If you need to read such files regularly then reading of such text files could be implemented in VTK CSV file reader (vtkDelimitedTextReader) and exposed in Slicer.

1 Like

Ok, thanks for the info