Importing file as a Label Field
-
@fanruifu Thanks! Nop, these lines correspond in doing in thee GUI: import, select file, ok.
I want to reproduce: import, select file, import file as a label field (pop up window that shows up when selecting the file), ok.
I hope it is clear, thank you! -
-
Hi, not sure this api is already in the release version, but in the dev version there is
ImageModeling.ImportImage(filepath, as_labelfield: bool = False, tissuelist_path: str = "")
This would allow you to import as labelfield and pre-assign the tissue names and colors.
If that doesn't work, you can access the options using following strategy:
- create an importer for the file,
- inspect the options.
This is a (general) solution to Import with the options:
imp = XCoreModeling.CreateImporterFromFile(file_path) imp.Options.ImportLabelField.Value = True imp.Import(file_path)
To inspect the options, you can use the
DumpTree
method:imp.Options.DumpTree()
-
This post is deleted!
-
This post is deleted!