NAMIC Wiki:ShapeAnalysis:ShapeAnalysisStatFilters

From NAMIC Wiki
Jump to: navigation, search
Home < NAMIC Wiki:ShapeAnalysis:ShapeAnalysisStatFilters

Discussion for design of statistical filters of study data in itk


  • The statistical filter needs to load the data from the input study.
  • Since the matching from filename to DataObject type is not unique, the measurement type needs to be supplied. This could be achieved via templating.
  • The location in the study hierarchy of the output attachment is left to the filter
  • The location of the saving of the output objects is determined by the input study
  • A filter should provide the possibility not to overwrite existing data, but rather should write new data on each call modyfying the output with a montonically increasing 'run'-id
  • A filter has to supply at least the following routines:
    • SetInputStatStudy (study): sets the study to be processed
    • SetInputObjectID (TypeID): The object/structure name (e.g. hippocampus) to be processed within the study.
    • SetInputMeasurementID (keyword): The object measurement (e.g. RigidAlignedMeshRef) for the objects to be processed within the study
    • SetInputPopulationIDList (listOfPopulationID's): Which populations to process. A filter may choose only the first 'n'-populations, e.g. only the first 2 if the filter compares only 2 populations
    • SetOutputMeasurementName (keyword): The object measurement (e.g. RigidAlignedMeshRef) for the result of the filter. If the filter has multiple output measurements, then this serves as a base keyword.
    • SetOutputPath (path): Path to storage location for output files

  • The definition of how a statistical filter should save its data in the StudyObject datastructure can be found here

Simple Example:

  • Difference of dimension-wise means of 2 hippocampus mesh populations:
// change the output path in the study to wherever you want the output to go to
typedef MeshStatisticalObject<double> objectFeatType;
tyepdef MeanDifferenceStatisticalFilter<objectFeatType> statFilter;
statFilter::Pointer DiffMeanStatFilter = statFilter::New();
DiffMeanStatFilter->SetInputObjectID("1"); // id of hippocampus

Example of xml file part related to statistical filters

<Name type="string">NonParametricPermutationSignificanceMapFilter</Name>
<NumberOfPermutations type="int">10000</NumberOfPermutations>
<Population1ID type="string">SZ</Population1ID>
<Population2ID type="string">NC</Population2ID>
<NumberOfObjects type="unsigned int">1</NumberOfObjects>
<Name type="string">hippocampus</Name>
<TypeID type="string">1</ID>
<ScaleAlignedMeshRef type="string">/data/hippo/mesh/proc_align_orig_scale/SNPPM_HotellingSignificance_1_SZ_NC.mha</ScaleAlignedMeshRef>