|
Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Libs/MRML/Logic/vtkMRMLIOOptionsDescription.h>


Public Types | |
| typedef vtkObject | Superclass |
Public Member Functions | |
| void | AddBoolOption (const std::string &property, const std::string &label, const std::string &toolTip, bool defaultValue) |
| Add an option. If an option already exists for the property then it is replaced. | |
| void | AddDoubleOption (const std::string &property, const std::string &label, const std::string &toolTip, double defaultValue, double minimum, double maximum, int decimals) |
| void | AddEnumChoice (const std::string &property, const vtkVariant &value, const std::string &label) |
| void | AddEnumOption (const std::string &property, const std::string &label, const std::string &toolTip, const vtkVariant &defaultValue) |
| Add an option that can have one of the values added by AddEnumChoice(). | |
| void | AddIntOption (const std::string &property, const std::string &label, const std::string &toolTip, int defaultValue, int minimum, int maximum) |
| void | AddNodeOption (const std::string &property, const std::string &label, const std::string &toolTip, const std::string &defaultNodeID, const std::vector< std::string > &nodeClasses, bool noneEnabled) |
| Add an option for selecting a MRML node. The value is the node ID. | |
| void | AddStringListOption (const std::string &property, const std::string &label, const std::string &toolTip, const std::vector< std::string > &defaultValue, const std::string &separator=";") |
| void | AddStringOption (const std::string &property, const std::string &label, const std::string &toolTip, const std::string &defaultValue) |
| bool | GetBoolOptionValue (const std::string &property, bool defaultValue=false) |
| Effective value of a boolean option. Returns defaultValue if the option is not found. | |
| virtual const char * | GetClassName () |
| vtkMRMLIOProperties * | GetDefaults () |
| std::string | GetFileName () |
| Get the file name from the properties. If multiple file names are specified then the first one is returned. | |
| std::vector< std::string > | GetFileNames () |
| Get all file names from the properties. | |
| std::string | GetNthOptionChoiceLabel (int index, int choiceIndex) |
| vtkVariant | GetNthOptionChoiceValue (int index, int choiceIndex) |
| int | GetNthOptionDecimals (int index) |
| Number of decimals of a double option. Returns -1 if not specified. | |
| bool | GetNthOptionEnabled (int index) |
| bool | GetNthOptionHasRange (int index) |
| Returns true if the option has a range (int and double options). | |
| std::string | GetNthOptionLabel (int index) |
| double | GetNthOptionMaximum (int index) |
| double | GetNthOptionMinimum (int index) |
| std::vector< std::string > | GetNthOptionNodeClasses (int index) |
| Node classes, whether "None" can be selected, and whether hidden nodes are shown (node options). | |
| bool | GetNthOptionNoneEnabled (int index) |
| int | GetNthOptionNumberOfChoices (int index) |
| Choices of an enum option. | |
| std::string | GetNthOptionProperty (int index) |
| std::string | GetNthOptionSeparator (int index) |
| Separator of items of a string list option. | |
| bool | GetNthOptionShowHidden (int index) |
| std::vector< std::string > | GetNthOptionStringListValue (int index) |
| Effective value of a string list option. | |
| std::string | GetNthOptionToolTip (int index) |
| std::string | GetNthOptionType (int index) |
| Option type: "bool", "int", "double", "string", "stringList", "enum", or "node". | |
| vtkVariant | GetNthOptionValue (int index) |
| bool | GetNthOptionVisible (int index) |
| std::string | GetNthOptionWidget (int index) |
| Hint for choosing a specific widget (for example "colorTable"). Empty if not specified. | |
| int | GetNumberOfOptions () |
| Number of options. | |
| int | GetOptionIndex (const std::string &property) |
| Get index of the option that sets the specified property. Returns -1 if not found. | |
| vtkVariant | GetOptionValue (const std::string &property) |
| void | GetOptionValues (vtkMRMLIOProperties *values) |
| Get the effective values of all options. Options that have empty string or string list values are not included. | |
| vtkMRMLIOProperties * | GetProperties () |
| bool | HasOption (const std::string &property) |
| virtual int | IsA (const char *type) |
| void | PrintSelf (ostream &os, vtkIndent indent) override |
| void | RemoveAllOptions () |
| Remove all options. | |
| void | SetDefaults (vtkMRMLIOProperties *defaults) |
| Default values specified by the application (for example, from user settings). | |
| void | SetOptionEnabled (const std::string &property, bool enabled) |
| Set additional attributes of an option. | |
| void | SetOptionShowHidden (const std::string &property, bool showHidden) |
| Show nodes that are hidden from editors in node selectors. | |
| void | SetOptionVisible (const std::string &property, bool visible) |
| void | SetOptionWidget (const std::string &property, const std::string &widget) |
| Hint for choosing a specific widget (for example "colorTable"). | |
| void | SetProperties (vtkMRMLIOProperties *properties) |
| Context and current values of options (for example, edited by the user). These values take precedence over defaults. | |
| std::string | ToJSON () |
| Get the description of all options as JSON. | |
Static Public Member Functions | |
| static int | IsTypeOf (const char *type) |
| static vtkMRMLIOOptionsDescription * | New () |
| static vtkMRMLIOOptionsDescription * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
| vtkMRMLIOOptionsDescription () | |
| ~vtkMRMLIOOptionsDescription () override | |
Description of the options of a file reader or writer (properties that the user can set, such as "labelmap"), which user interfaces use to display widgets for setting the options. Readers and writers add options in vtkMRMLFileIOHandler::GetOptionsDescription() using the Add...Option() methods. User interfaces read the options using the GetNthOption...() methods, or as JSON (ToJSON()).
See https://slicer.readthedocs.io/en/latest/developer_guide/mrml_overview.html#reader-and-writer-options
Definition at line 38 of file vtkMRMLIOOptionsDescription.h.
| typedef vtkObject vtkMRMLIOOptionsDescription::Superclass |
Definition at line 42 of file vtkMRMLIOOptionsDescription.h.
|
protected |
|
overrideprotected |
| void vtkMRMLIOOptionsDescription::AddBoolOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| bool | defaultValue ) |
Add an option. If an option already exists for the property then it is replaced.
| void vtkMRMLIOOptionsDescription::AddDoubleOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| double | defaultValue, | ||
| double | minimum, | ||
| double | maximum, | ||
| int | decimals ) |
| void vtkMRMLIOOptionsDescription::AddEnumChoice | ( | const std::string & | property, |
| const vtkVariant & | value, | ||
| const std::string & | label ) |
| void vtkMRMLIOOptionsDescription::AddEnumOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| const vtkVariant & | defaultValue ) |
Add an option that can have one of the values added by AddEnumChoice().
| void vtkMRMLIOOptionsDescription::AddIntOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| int | defaultValue, | ||
| int | minimum, | ||
| int | maximum ) |
| void vtkMRMLIOOptionsDescription::AddNodeOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| const std::string & | defaultNodeID, | ||
| const std::vector< std::string > & | nodeClasses, | ||
| bool | noneEnabled ) |
Add an option for selecting a MRML node. The value is the node ID.
| void vtkMRMLIOOptionsDescription::AddStringListOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| const std::vector< std::string > & | defaultValue, | ||
| const std::string & | separator = ";" ) |
| void vtkMRMLIOOptionsDescription::AddStringOption | ( | const std::string & | property, |
| const std::string & | label, | ||
| const std::string & | toolTip, | ||
| const std::string & | defaultValue ) |
| bool vtkMRMLIOOptionsDescription::GetBoolOptionValue | ( | const std::string & | property, |
| bool | defaultValue = false ) |
Effective value of a boolean option. Returns defaultValue if the option is not found.
|
virtual |
| vtkMRMLIOProperties * vtkMRMLIOOptionsDescription::GetDefaults | ( | ) |
| std::string vtkMRMLIOOptionsDescription::GetFileName | ( | ) |
Get the file name from the properties. If multiple file names are specified then the first one is returned.
| std::vector< std::string > vtkMRMLIOOptionsDescription::GetFileNames | ( | ) |
Get all file names from the properties.
| std::string vtkMRMLIOOptionsDescription::GetNthOptionChoiceLabel | ( | int | index, |
| int | choiceIndex ) |
| vtkVariant vtkMRMLIOOptionsDescription::GetNthOptionChoiceValue | ( | int | index, |
| int | choiceIndex ) |
| int vtkMRMLIOOptionsDescription::GetNthOptionDecimals | ( | int | index | ) |
Number of decimals of a double option. Returns -1 if not specified.
| bool vtkMRMLIOOptionsDescription::GetNthOptionEnabled | ( | int | index | ) |
| bool vtkMRMLIOOptionsDescription::GetNthOptionHasRange | ( | int | index | ) |
Returns true if the option has a range (int and double options).
| std::string vtkMRMLIOOptionsDescription::GetNthOptionLabel | ( | int | index | ) |
| double vtkMRMLIOOptionsDescription::GetNthOptionMaximum | ( | int | index | ) |
| double vtkMRMLIOOptionsDescription::GetNthOptionMinimum | ( | int | index | ) |
| std::vector< std::string > vtkMRMLIOOptionsDescription::GetNthOptionNodeClasses | ( | int | index | ) |
Node classes, whether "None" can be selected, and whether hidden nodes are shown (node options).
| bool vtkMRMLIOOptionsDescription::GetNthOptionNoneEnabled | ( | int | index | ) |
| int vtkMRMLIOOptionsDescription::GetNthOptionNumberOfChoices | ( | int | index | ) |
Choices of an enum option.
| std::string vtkMRMLIOOptionsDescription::GetNthOptionProperty | ( | int | index | ) |
Get attributes of the option at the specified index (0 <= index < GetNumberOfOptions()). User interfaces use these methods to display widgets for the options. If the index is out of range then an error is logged and an empty value is returned.
| std::string vtkMRMLIOOptionsDescription::GetNthOptionSeparator | ( | int | index | ) |
Separator of items of a string list option.
| bool vtkMRMLIOOptionsDescription::GetNthOptionShowHidden | ( | int | index | ) |
| std::vector< std::string > vtkMRMLIOOptionsDescription::GetNthOptionStringListValue | ( | int | index | ) |
Effective value of a string list option.
| std::string vtkMRMLIOOptionsDescription::GetNthOptionToolTip | ( | int | index | ) |
| std::string vtkMRMLIOOptionsDescription::GetNthOptionType | ( | int | index | ) |
Option type: "bool", "int", "double", "string", "stringList", "enum", or "node".
| vtkVariant vtkMRMLIOOptionsDescription::GetNthOptionValue | ( | int | index | ) |
Effective value of the option (from properties, defaults, or the default specified for the option). Boolean values are returned as integer (0 or 1), enum values keep the type of the choice values. For string list options, use GetNthOptionStringListValue() instead.
| bool vtkMRMLIOOptionsDescription::GetNthOptionVisible | ( | int | index | ) |
| std::string vtkMRMLIOOptionsDescription::GetNthOptionWidget | ( | int | index | ) |
Hint for choosing a specific widget (for example "colorTable"). Empty if not specified.
| int vtkMRMLIOOptionsDescription::GetNumberOfOptions | ( | ) |
Number of options.
| int vtkMRMLIOOptionsDescription::GetOptionIndex | ( | const std::string & | property | ) |
Get index of the option that sets the specified property. Returns -1 if not found.
| vtkVariant vtkMRMLIOOptionsDescription::GetOptionValue | ( | const std::string & | property | ) |
Effective value of an option (from properties, defaults, or the default specified for the option). Returns invalid variant if the option is not found. For string list options, items are joined using the separator.
| void vtkMRMLIOOptionsDescription::GetOptionValues | ( | vtkMRMLIOProperties * | values | ) |
Get the effective values of all options. Options that have empty string or string list values are not included.
| vtkMRMLIOProperties * vtkMRMLIOOptionsDescription::GetProperties | ( | ) |
| bool vtkMRMLIOOptionsDescription::HasOption | ( | const std::string & | property | ) |
|
virtual |
|
static |
|
static |
|
override |
| void vtkMRMLIOOptionsDescription::RemoveAllOptions | ( | ) |
Remove all options.
|
static |
| void vtkMRMLIOOptionsDescription::SetDefaults | ( | vtkMRMLIOProperties * | defaults | ) |
Default values specified by the application (for example, from user settings).
| void vtkMRMLIOOptionsDescription::SetOptionEnabled | ( | const std::string & | property, |
| bool | enabled ) |
Set additional attributes of an option.
| void vtkMRMLIOOptionsDescription::SetOptionShowHidden | ( | const std::string & | property, |
| bool | showHidden ) |
Show nodes that are hidden from editors in node selectors.
| void vtkMRMLIOOptionsDescription::SetOptionVisible | ( | const std::string & | property, |
| bool | visible ) |
| void vtkMRMLIOOptionsDescription::SetOptionWidget | ( | const std::string & | property, |
| const std::string & | widget ) |
Hint for choosing a specific widget (for example "colorTable").
| void vtkMRMLIOOptionsDescription::SetProperties | ( | vtkMRMLIOProperties * | properties | ) |
Context and current values of options (for example, edited by the user). These values take precedence over defaults.
| std::string vtkMRMLIOOptionsDescription::ToJSON | ( | ) |
Get the description of all options as JSON.