|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Writes classification feature results to a CSV-style output file. More...
#include <mitkCLResultWriter.h>
Public Member Functions | |
| FeatureResultWriter (std::string filePath, int mode) | |
| Construct a result writer for the given file path. More... | |
| ~FeatureResultWriter () | |
| Destructor. Flushes and closes the output file. More... | |
| void | SetDecimalPoint (char decimal) |
| Set a custom decimal point character for numeric output. More... | |
| void | AddSubjectInformation (std::string value) |
| Add subject-identifying information to the current row. More... | |
| void | AddColumn (std::string value) |
| Add a string column value to the current row. More... | |
| void | AddColumn (double value) |
| Add a numeric column value to the current row. More... | |
| void | NewRow (std::string endName) |
| Finalize the current row and start a new one. More... | |
| void | AddResult (std::string desc, int slice, mitk::AbstractGlobalImageFeature::FeatureListType stats, bool withHeader, bool withDescription) |
| Add a row of feature results to the output. More... | |
| void | AddHeader (std::string desc, int slice, mitk::AbstractGlobalImageFeature::FeatureListType stats, bool withHeader, bool withDescription) |
| Add a header row describing the feature columns. More... | |
Writes classification feature results to a CSV-style output file.
Supports row-by-row construction of output with columns for subject information, feature descriptions, and computed feature values. Results can be written with configurable decimal point characters and optional header rows.
Definition at line 35 of file mitkCLResultWriter.h.
| mitk::cl::FeatureResultWriter::FeatureResultWriter | ( | std::string | filePath, |
| int | mode | ||
| ) |
Construct a result writer for the given file path.
| filePath | Path to the output file. |
| mode | Output mode (0 = new file, 1 = append). |
| mitk::cl::FeatureResultWriter::~FeatureResultWriter | ( | ) |
Destructor. Flushes and closes the output file.
| void mitk::cl::FeatureResultWriter::AddColumn | ( | double | value | ) |
Add a numeric column value to the current row.
| value | The numeric value to add. |
| void mitk::cl::FeatureResultWriter::AddColumn | ( | std::string | value | ) |
Add a string column value to the current row.
| value | The string value to add. |
| void mitk::cl::FeatureResultWriter::AddHeader | ( | std::string | desc, |
| int | slice, | ||
| mitk::AbstractGlobalImageFeature::FeatureListType | stats, | ||
| bool | withHeader, | ||
| bool | withDescription | ||
| ) |
Add a header row describing the feature columns.
| desc | Description string for this header. |
| slice | The slice index. |
| stats | The feature list used to derive column names. |
| withHeader | Whether to actually write the header. |
| withDescription | Whether to include feature description columns. |
| void mitk::cl::FeatureResultWriter::AddResult | ( | std::string | desc, |
| int | slice, | ||
| mitk::AbstractGlobalImageFeature::FeatureListType | stats, | ||
| bool | withHeader, | ||
| bool | withDescription | ||
| ) |
Add a row of feature results to the output.
| desc | Description string for this result set. |
| slice | The slice index (-1 for the entire image). |
| stats | The list of computed feature name-value pairs. |
| withHeader | Whether to include a header row before the data. |
| withDescription | Whether to include feature description columns. |
| void mitk::cl::FeatureResultWriter::AddSubjectInformation | ( | std::string | value | ) |
Add subject-identifying information to the current row.
| value | The subject identifier string. |
| void mitk::cl::FeatureResultWriter::NewRow | ( | std::string | endName | ) |
Finalize the current row and start a new one.
| endName | A label appended at the end of the row. |
| void mitk::cl::FeatureResultWriter::SetDecimalPoint | ( | char | decimal | ) |
Set a custom decimal point character for numeric output.
| decimal | The decimal separator character (e.g. ',' for European locale). |