PTKResultsTable#

This entry is incomplete and will be expanded in the future

PTKResultsTable is a class used to store measurement/analysis results.

You will typically use a PTKResultsTable to concatenate results from multiple patients and/or multiple measurements, and/or multiple contexts.

While a PTKMetric stores a single measurement results, a PTKResultsTable stores all your results together, making it easy to generate graphs or data files. Once yours results are in a PTKResultsTable, you can create a graph or save a results table with a single line of code.

You can create a PTKResultsTable yourself, or access or merge tables generated by analysis plugins.

PTKResultsTable has four dimensions:

  1. Patient (identified by patient ID)

  2. Metric (Identified by metric ID)

  3. Context (identified by character representation of PTKContext enumeration)

  4. Slice number

The underlying ResultsTable is a 4D structure array. The IndexMaps property contains 4 maps; one for each of the dimensions described above. Each map tells you the index for the desired patient/metric/context/slice.

For example, if you have a patient with UID specified by my_uid, then use IndexMaps{1}(my_uid) with the map key UID. This gives you the index in the table which corresponds to that patient.

Similarly, if you want the index of the metric “WallThickness”, this is given by IndexMaps{2}(“WallThickness”)

The slice number is for when you are performing axial/coronal/sagittal analysis of the image by dividing it into bins along the axis. See the AxialMetrics / CoronalMetrics / SagittalMetrics plugins for how this works

The NameMaps property stores the human-readable name for each metric, context or patient. These values will be used to generate the axes labels in the graphs, and the column and row labels in the CSV files.

Useful functions to use with PTKResultsTable:

  • PTKSaveTableAsCSV uses your table to generate one or more CSV files (which can be loaded into Excel). You specify what appears in the rows and columns of the table. PTKGraphContextVsMetric.m draws a graph showing the value of a particular metric for one or more contexts, and for one or more patients PTKDrawMetricVsMetric.m

  • PTKDrawMetricVsDistance.m generates a graph for slice analysis (axial/coronal/sagittal analysis)