当前位置: 首页>>代码示例>>Python>>正文


Python create_example_from_templates.ExampleFromTemplate类代码示例

本文整理汇总了Python中create_example_from_templates.ExampleFromTemplate的典型用法代码示例。如果您正苦于以下问题:Python ExampleFromTemplate类的具体用法?Python ExampleFromTemplate怎么用?Python ExampleFromTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ExampleFromTemplate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

def main():
	nidm_classes = {
		"DisplayMaskMap": dict(
			display_map_id="niiri:display_map_id",
			label="Display Mask Map",
			location="file://./DisplayMask.nii.gz",
			user_defined="true",
			filename="DisplayMask.nii.gz",
			format="image/nifti",
			coordinate_space_id="niiri:coordinate_space_id_1",
			sha="e43b6e01b0463fe7d40782137867a..."
			),
		"CoordinateSpace-1": dict(
			coordinate_space_id="niiri:coordinate_space_id_1",
			label="Coordinate space 1",
			voxel_to_world_mapping="[[-3, 0, 0, 78],[0, 3, 0, -112],[0, 0, 3, -70],[0, 0, 0, 1]]",
			voxel_units="[ \\\"mm\\\", \\\"mm\\\", \\\"mm\\\" ]",
			voxel_size="[ 3, 3, 3 ]",
			coord_system="nidm:NIDM_0000051",
			number_of_dim="3",
			dimensions="[ 53, 63, 52 ]"),
		"ActivityUsedEntity": dict(
			activity_id="niiri:display_map_id",
			activity_type="nidm:NIDM_0000049",
			entity_id="niiri:height_threshold_id", 
			)
		}

	NIDM_SPM_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'spm', 'example005')
	ttl_file = os.path.join(NIDM_SPM_DIR, 'nidm.ttl')
	example = ExampleFromTemplate(nidm_classes, ttl_file, False)
	example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:33,代码来源:create_spm_example_005.py

示例2: main

def main():
	nidm_classes = {
		"HeightThreshold_PFWE": dict(
			height_threshold_id="niiri:height_threshold_id",
			label="Height Threshold: p<0.05 (FWE)",
			p_fwe="0.050000",
			thresh_type="p-value FWE"
			),
		"FSL_ExtentThresholdNoType": dict(
			extent_threshold_id="niiri:extent_threshold_id",
			label="Extent Threshold: k>=0",
			p_fwe="1.0"
			),
		"InferenceUsedThresh": dict(
			inference_id="niiri:inference_id",
			height_thresh_id="niiri:height_threshold_id", 
			extent_thresh_id="niiri:extent_threshold_id", 
			)
		}

	NIDM_FSL_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'fsl', 'example002')
	ttl_file = os.path.join(NIDM_FSL_DIR, 'fsl_nidm.ttl')
	example = ExampleFromTemplate(nidm_classes, ttl_file, False)
	example.create_example()
开发者ID:ilogue,项目名称:nidm,代码行数:25,代码来源:create_fsl_example_002.py

示例3: explicit_mask

def explicit_mask():
    nidm_classes = {
        "MaskMap": dict(
            mask_id="niiri:explicit_mask_id",
            label="Mask Map",
            location="",
            filename="",
            user_defined="true",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="",
            used_by_act_id="niiri:model_parameter_estimation_id"
            ),
        "ActivityUsedEntity": dict(
            activity_id="niiri:model_parameter_estimation_id",
            activity_type=q_graph.qname(NIDM_MODEL_PARAMETERS_ESTIMATION),
            entity_id="niiri:explicit_mask_id",
            )
        }

    MIN_EX_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'test',
        'minimal_examples', 'explicit_mask')
    ttl_file = os.path.join(MIN_EX_DIR, 'nidm.ttl')
    example = ExampleFromTemplate(
        nidm_classes, ttl_file, False, remove_att=[
            NIDM_IN_COORDINATE_SPACE,
            PROV.atLocation, NFO.fileName, CRYPTO.sha512, DC.description])
    example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:29,代码来源:create_minimal_examples.py

示例4: f_test

def f_test():
    nidm_classes = {
        "ContrastExplainedMeanSquareMap": dict(
            id="niiri:contrast_explained_mean_square_map_id",
            label="Contrast Explained Mean Square Map",
            location="file://./ContrastExplainedMeanSquareMap_F001.nii.gz",
            filename="ContrastExplainedMeanSquareMap_F001.nii.gz",
            format="image/nifti",
            coordinate_space_id="",
            sha="",
            contrast_est_id="niiri:contrast_estimation_id",
            ),
        "EntityWasGeneratedByActivity": dict(
            activity_id="niiri:contrast_estimation_id",
            activity_type=q_graph.qname(NIDM_CONTRAST_ESTIMATION),
            entity_id="niiri:contrast_explained_mean_square_map_id",
            )
        }

    MIN_EX_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'test',
        'minimal_examples', 'f_test')
    ttl_file = os.path.join(MIN_EX_DIR, 'nidm.ttl')
    example = ExampleFromTemplate(nidm_classes, ttl_file, False,
                                  remove_att=[
                                      NIDM_IN_COORDINATE_SPACE,
                                      PROV.atLocation, CRYPTO.sha512])
    example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:28,代码来源:create_minimal_examples.py

示例5: design_matrix_event_related

def design_matrix_event_related():
    nidm_classes = {
        "DesignMatrix_1stLevel": dict(
            design_matrix_id='niiri:design_matrix_id',
            label="Design Matrix",
            location="file://./DesignMatrix.csv",
            format="text/csv",
            filename="DesignMatrix.csv",
            design_matrix_png_id="niiri:design_matrix_png_id",
            regressors="",
            design=q_graph.qname(NIDM_EVENT_RELATED_DESIGN),
            hrf_basis="",
            drift_model=""),
        "ActivityUsedEntity": dict(
            activity_id="niiri:model_parameter_estimation_id",
            activity_type=q_graph.qname(NIDM_MODEL_PARAMETERS_ESTIMATION),
            entity_id="niiri:design_matrix_id",
            )
        }

    MIN_EX_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'test',
        'minimal_examples', 'event_related_design')
    ttl_file = os.path.join(MIN_EX_DIR, 'nidm.ttl')
    example = ExampleFromTemplate(
        nidm_classes, ttl_file, False,
        remove_att=[NIDM_REGRESSOR_NAMES, NIDM_HAS_HRF_BASIS,
                    NIDM_HAS_DRIFT_MODEL])
    example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:29,代码来源:create_minimal_examples.py

示例6: main

def main():
	nidm_classes = {
        "HeightThreshold": dict(
            height_threshold_id="niiri:height_threshold_id",
            thresh_type=NIDM_P_VALUE_UNCORRECTED_QNAME,
            label="Height Threshold: p<0.05 (uncorrected)",
            value="0.050000",
            ),
        "ExtentThresholdStat": dict(
            extent_threshold_id="niiri:extent_threshold_id",
            label="Extent Threshold: k>=0",
            thresh_type=OBO_STATISTIC_QNAME,
            cluster_size_vox="0",
            ),
		"InferenceUsedThresh": dict(
			inference_id="niiri:inference_id",
			height_thresh_id="niiri:height_threshold_id", 
			extent_thresh_id="niiri:extent_threshold_id", 
			)
		}

	NIDM_FSL_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'fsl', 'example003')
	ttl_file = os.path.join(NIDM_FSL_DIR, 'fsl_nidm.ttl')
	example = ExampleFromTemplate(nidm_classes, ttl_file, False)
	example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:26,代码来源:create_fsl_example_003.py

示例7: main

def main():
    nidm_classes = {
        "HeightThreshold": dict(
            height_threshold_id="niiri:height_threshold_id",
            thresh_type=OBO_P_VALUE_FWER_QNAME,
            label="Height Threshold: p<0.05 (FWE)",
            value="0.050000",
            ),
        "ExtentThresholdStat": dict(
            extent_threshold_id="niiri:extent_threshold_id",
            label="Extent Threshold: k>=0",
            thresh_type=OBO_STATISTIC_QNAME,
            cluster_size_vox="0",
            ),
        "InferenceUsedThresh": dict(
            inference_id="niiri:inference_id",
            height_thresh_id="niiri:height_threshold_id",
            extent_thresh_id="niiri:extent_threshold_id",
            )
        }

    NIDM_FSL_DIR = os.path.join(os.path.dirname(
        os.path.dirname(
            os.path.abspath(__file__))), 'test', 'ground_truth',
        'voxelwise_p050_fwe')
    ttl_file = os.path.join(NIDM_FSL_DIR, 'nidm.ttl')
    example = ExampleFromTemplate(nidm_classes, ttl_file, False)
    example.create_example()
开发者ID:INCF,项目名称:nidm,代码行数:28,代码来源:create_fsl_example_002.py

示例8: main

def main():
	nidm_classes = {
		"Inference": dict(
			inference_id="niiri:inference_id_1",
			label="Inference",
			alternative_hyp="nidm:NIDM_0000060",
			stat_map_id="niiri:statistic_map_id", 
			height_thresh_id="niiri:height_threshold_id", 
			extent_thresh_id="niiri:extent_threshold_id", 
			display_mask_id="niiri:display_map_id", 
			peak_def_id="niiri:peak_definition_criteria_id", 
			cluster_def_id="niiri:cluster_definition_criteria_id",
			mask_id="niiri:mask_id_1",
			software_id="niiri:software_id"
			),
		"ConjunctionInference": dict(
			conj_inference_id="niiri:conjunction_id_1",
			label="Conjunction Inference",
			alternative_hyp="nidm:NIDM_0000060",
			stat_map_id_1="niiri:statistic_map_id_1", 
			stat_map_id_2="niiri:statistic_map_id_2", 
			height_thresh_id="niiri:height_threshold_id", 
			extent_thresh_id="niiri:extent_threshold_id", 
			display_mask_id="niiri:display_map_id", 
			peak_def_id="niiri:peak_definition_criteria_id", 
			cluster_def_id="niiri:cluster_definition_criteria_id",
			mask_id="niiri:mask_id_1",
			software_id="niiri:software_id"
			),
		"SPM_KConjunctionInference": dict(
			conj_inference_id="niiri:conjunction_id_2",
			label="k-Conjunction Inference",
			alternative_hyp="nidm:NIDM_0000060",
			stat_map_id_1="niiri:statistic_map_id_1", 
			stat_map_id_2="niiri:statistic_map_id_2", 
			global_null_degree="1",
			height_thresh_id="niiri:height_threshold_id", 
			extent_thresh_id="niiri:extent_threshold_id", 
			display_mask_id="niiri:display_map_id", 
			peak_def_id="niiri:peak_definition_criteria_id", 
			cluster_def_id="niiri:cluster_definition_criteria_id",
			mask_id="niiri:mask_id_1",
			software_id="niiri:software_id"
			),
		}

	NIDM_SPM_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'spm', "example004")
	ttl_file = os.path.join(NIDM_SPM_DIR, 'spm_inference_activities.ttl')
	example = ExampleFromTemplate(nidm_classes, ttl_file, False)
	example.create_example()
开发者ID:ilogue,项目名称:nidm,代码行数:51,代码来源:create_spm_example_004.py

示例9: main


#.........这里部分代码省略.........
            cluster_label_id="3",
            cluster_size_in_resels="0.278388924695318",
            p_value_unc="0.00497953247554004",
            p_value_fwe="0.000255384009130943",
            p_value_fdr="0.00829922079256674",
            excursion_set_id="niiri:excursion_set_map_id"
            ),
        "SupraThresholdCluster-4": dict(
            cluster_id="niiri:supra_threshold_cluster_0004",
            label="Supra-Threshold Cluster: 0004",
            cluster_size_in_voxels="29",
            cluster_label_id="4",
            cluster_size_in_resels="0.218196724761195",
            p_value_unc="0.0110257032104773",
            p_value_fwe="0.000565384750377596",
            p_value_fdr="0.0137821290130967",
            excursion_set_id="niiri:excursion_set_map_id"
            ),
        "SupraThresholdCluster-5": dict(
            cluster_id="niiri:supra_threshold_cluster_0005",
            label="Supra-Threshold Cluster: 0005",
            cluster_size_in_voxels="12",
            cluster_label_id="5",
            cluster_size_in_resels="0.0902882999011843",
            p_value_unc="0.0818393184514307",
            p_value_fwe="0.00418900977248904",
            p_value_fdr="0.0818393184514307",
            excursion_set_id="niiri:excursion_set_map_id"
            ),
        "Peak_ValueP-1": dict(
            peak_id="niiri:peak_0001",
            label="Peak: 0001",
            location="niiri:coordinate_0001",
            value="17.5207633972168",
            equiv_z="INF",
            p_uncorr="4.44089209850063e-16",
            p_value_fwe="0",
            p_value_fdr="1.19156591713838e-11",
            cluster_id="niiri:supra_threshold_cluster_0001"
            ),
        "Coordinate-1": dict(
            coordinate_id="niiri:coordinate_0001",
            label="Coordinate: 0001",
            coord="[ -60, -25, 11 ]"
            ),
        "Peak_ValueP-2": dict(
            peak_id="niiri:peak_0002",
            label="Peak: 0002",
            location="niiri:coordinate_0002",
            value="13.0321407318",
            equiv_z="INF",
            p_uncorr="4.44089209850063e-16",
            p_value_fwe="0",
            p_value_fdr="1.19156591714e-11",
            cluster_id="niiri:supra_threshold_cluster_0001"
            ),
        "Coordinate-2": dict(
            coordinate_id="niiri:coordinate_0002",
            label="Coordinate: 0002",
            coord="[ -42, -31, 11 ]"
            ),
        "Peak_ValueP-3": dict(
            peak_id="niiri:peak_0003",
            label="Peak: 0003",
            location="niiri:coordinate_0003",
            value="10.2856016159058",
            equiv_z="INF",
            p_uncorr="4.44089209850063e-16",
            p_value_fwe="7.69451169446711e-12",
            p_value_fdr="6.84121260274992e-10",
            cluster_id="niiri:supra_threshold_cluster_0001"
            ),
        "Coordinate-3": dict(
            coordinate_id="niiri:coordinate_0003",
            label="Coordinate: 0003",
            coord="[ -66, -31, -1 ]"
            ),
        "Peak_ValueP-4": dict(
            peak_id="niiri:peak_0004",
            label="Peak: 0004",
            location="niiri:coordinate_0004",
            value="13.5425577163696",
            equiv_z="INF",
            p_uncorr="4.44089209850063e-16",
            p_value_fwe="0",
            p_value_fdr="1.19156591713838e-11",
            cluster_id="niiri:supra_threshold_cluster_0002"
            ),
        "Coordinate-4": dict(
            coordinate_id="niiri:coordinate_0004",
            label="Coordinate: 0004",
            coord="[ 63, -13, -4 ]"
            )
        }

    NIDM_SPM_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'spm', "example003")
    ttl_file = os.path.join(NIDM_SPM_DIR, 'spm_results_conjunction.ttl')
    example = ExampleFromTemplate(nidm_classes, ttl_file, False)
    example.create_example()
开发者ID:yarikoptic,项目名称:nidm,代码行数:101,代码来源:create_spm_example_003.py

示例10: main


#.........这里部分代码省略.........
            ),
        "FSL_Coordinate-1-2": dict(
            coordinate_id="niiri:coordinate_0001_2",
            label="Coordinate 0001_2",
            coord="[ -9.14, 30.5, 23.7 ]",
            coord_in_vox="[ 33, 43, 28 ]"
            ),
        "Peak-1-3": dict(
            peak_id="niiri:peak_0001_3",
            label="Peak 0001_3",
            p_uncorr="0.00122277",
            location="niiri:coordinate_0001_3",
            equiv_z="3.03",
            cluster_id="niiri:supra_threshold_cluster_0001"
            ),
        "FSL_Coordinate-1-3": dict(
            coordinate_id="niiri:coordinate_0001_3",
            label="Coordinate 0001_3",
            coord="[ -19.6, 17.4, 34.7 ]",
            coord_in_vox="[ 36, 39, 30 ]"
            ),
        "Peak-1-4": dict(
            peak_id="niiri:peak_0001_4",
            label="Peak 0001_4",
            p_uncorr="0.00554262",
            location="niiri:coordinate_0001_4",
            equiv_z="2.54",
            cluster_id="niiri:supra_threshold_cluster_0001"
            ),
        "FSL_Coordinate-1-4": dict(
            coordinate_id="niiri:coordinate_0001_4",
            label="Coordinate 0001_4",
            coord="[ -9.64, 40.1, 17.3 ]",
            coord_in_vox="[ 33, 46, 27 ]"
            ),
        "FSL_SearchSpaceMaskMap": dict(
            search_space_id="niiri:search_space_mask_id",
            location="SearchSpaceMask.nii.gz",
            filename="SearchSpaceMask.nii.gz",
            label="Search Space Mask Map",
            user_defined="false",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_1",
            search_vol_voxels="45203",
            search_vol_units="1.93808e+06",
            search_vol_resels="3753.84",
            resel_size="12.0418",
            noise_roughness="0.384676",
            random_field_station="true",
            sha="cc1a96a6111e5107eb08487e38e6d7f8164b9d1d3f1fc10948bdbcfaea642\
fe9bfae278c7fc372b65cac7232ea58fd8fb5914014e7b9a5d6200592b12b2a728b",
            inference_id="niiri:inference_id_1",
            noise_fwhm_in_voxels="[2.38803, 2.43263, 2.07288]",
            noise_fwhm_in_units="[8.35811, 8.5142, 7.2551]"
            ),
        "NIDMBundle": dict(
            bundle_id="niiri:fsl_results_id",
            label="NIDM-Results",
            object_model="nidm:NIDM_0000027",
            version="1.1.0",
            time="2014-05-19T10:30:00.000+01:00",
            export_id="niiri:export_id"
            ),
        "FSL_Software": dict(
            software_id="niiri:software_id",
            software_type="scr:SCR_002823",
            label="FSL",
            version="5.0.x",
            feat_version="6.00"
            ),
        "GrandMeanMap": dict(
            grand_mean_map_id="niiri:grand_mean_map_id",
            label="Grand Mean Map",
            location="GrandMean.nii.gz",
            filename="GrandMean.nii.gz",
            format="image/nifti",
            masked_median="9597.36",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="7a2703cea740e27a5170fb19e4a09b5e815e4b7e477bc75958404d675aa40\
8f53f747892a2ef4472f933cf5f12cd21cea99d5f5e551938081636fb6d4049473e",
            model_pe_id="niiri:model_parameters_estimation_id"
            ),
        "ExporterSoftware": dict(
            software_id="niiri:exporter_id",
            software_type="nidm:NIDM_0000167",
            label="nidmfsl",
            version="0.2.0"
            ),
        "Export": dict(
            export_id="niiri:export_id",
            label="NIDM-Results export",
            exporter_id="niiri:exporter_id"
            )
        }

    NIDM_FSL_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'fsl', "example001")
    ttl_file = os.path.join(NIDM_FSL_DIR, 'fsl_nidm.ttl')
    example = ExampleFromTemplate(nidm_classes, ttl_file, False)
    example.create_example()
开发者ID:yarikoptic,项目名称:nidm,代码行数:101,代码来源:create_fsl_example_001.py

示例11: main


#.........这里部分代码省略.........
            label="Search Space Mask Map",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_2",
            expected_num_voxels="0.553331387916112",
            expected_num_clusters="0.0889172687960151",
            height_critical_fwe05="5.23529984739211",
            height_critical_fdr05="6.22537899017334",
            smallest_size_fwe05="1",
            smallest_size_fdr05="3",
            search_vol_voxels="65593",
            search_vol_units="1771011",
            resel_size="22.9229643140043",
            search_vol_resels="2552.68032521656",
            search_vol_resels_geom="[3, 72.3216126440484, 850.716735116472, \
2552.68032521656]",
            noise_fwhm_in_voxels="[ 2.95881189165801, 2.96628446669584, \
2.61180425626264 ]",
            noise_fwhm_in_units="[ 8.87643567497404, 8.89885340008753, \
7.83541276878791 ]",
            random_field_station="false",
            sha="e43b6e01b0463fe7d40782137867a",
            inference_id="niiri:inference_id"
            ),
        "FSL_ClusterCenterOfGravity": dict(
            comment="Cluster Center Of Gravity",
            center_of_gravity_id="niiri:center_of_gravity_1",
            location="niiri:coordinate_0001",
            label="Center of gravity",
            cluster_id="niiri:supra_threshold_cluster_0001",
            ),
        "CoordinateSpace": dict(
            comment="Coordinate Space",
            coordinate_space_id="niiri:coordinate_space_id_1",
            label="Coordinate space 1",
            voxel_to_world_mapping="[[-3, 0, 0, 78],[0, 3, 0, -112],\
[0, 0, 3, -50],[0, 0, 0, 1]]",
            voxel_units="[ \\\"mm\\\", \\\"mm\\\", \\\"mm\\\" ]",
            voxel_size="[ 3, 3, 3 ]",
            coord_system="nidm:NIDM_0000051",
            number_of_dim="3",
            dimensions="[ 53, 63, 46 ]"),
        "Image": dict(
            comment="Image",
            image_id="niiri:maximum_intensity_projection_id",
            location="MaximumIntensityProjection.png",
            filename="MaximumIntensityProjection.png",
            format="image/png"
            ),
        "GrandMeanMap": dict(
            comment="Grand Mean Map",
            grand_mean_map_id="niiri:grand_mean_map_id",
            label="Grand Mean Map",
            location="GrandMean.nii.gz",
            filename="GrandMean.nii.gz",
            format="image/nifti",
            masked_median="115",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="e43b6e01b0463fe7d40782137867a",
            model_pe_id="niiri:model_pe_id"
            ),
        "SPM_DriftModel": dict(
            comment="SPM's DCT Drift Model",
            id="niiri:drift_model_id",
            label="SPM's DCT Drift Model",
            cut_off="128"
            ),
        "FSL_DriftModel": dict(
            comment="FSL's Gaussian Running Line Drift Model",
            id="niiri:drift_model_id",
            label="FSL's Gaussian Running Line Drift Model",
            cut_off="2"
            ),
        "ClusterDefinitionCriteria-06": dict(
            comment="Cluster connectivity: face",
            cluster_definition_criteria_id="niiri:cluster_definition_criteria\
_id",
            label="Cluster Connectivity Criterion: 6",
            connectivity="nidm:NIDM_0000130"
            ),
        "ClusterDefinitionCriteria-18": dict(
            comment="Cluster connectivity: face or edge",
            cluster_definition_criteria_id="niiri:cluster_definition_criteria\
_id",
            label="Cluster Connectivity Criterion: 18",
            connectivity="nidm:NIDM_0000128"
            ),
        "ClusterDefinitionCriteria-26": dict(
            comment="Cluster connectivity: face, edge or corner",
            cluster_definition_criteria_id="niiri:cluster_definition_criteria\
_id",
            label="Cluster Connectivity Criterion: 26",
            connectivity="nidm:NIDM_0000129"
            )
        }

    # Delete old examples
    shutil.rmtree(EX_DIR)
    os.mkdir(EX_DIR)
    example = ExampleFromTemplate(nidm_classes, EX_DIR, True)
    example.create_example()
开发者ID:INCF,项目名称:nidm,代码行数:101,代码来源:create_term_examples.py

示例12: main


#.........这里部分代码省略.........
            inference_id="niiri:inference_id"
            ),
        "DerivedMap": dict(
            derived_from_map_id="niiri:contrast_map_id_der",
            derived_map_type="nidm:NIDM_0000002",
            filename="con_0001.nii",
            format="image/nifti",
            sha="277dd1da13d391c33c172fb8c71060008cc66e173de6362eb857b0055b41e\
9bae57911f7ec4b45659905103b1139ebf3da0c2d04cf105bbce0cdc3004b643c22",
            map_id="niiri:contrast_map_id"
            ),
        "DerivedMap-2": dict(
            derived_from_map_id="niiri:beta_map_id_2_der",
            derived_map_type="nidm:NIDM_0000061",
            filename="beta_0002.nii",
            format="image/nifti",
            sha="3f72b788762d9ab2c7ddb5e4d446872694ee42fc8897fe5317b54efb7924f\
784da6499065db897a49595d8763d1893ad65ad102b0c88f2e72e2d028173343008",
            map_id="niiri:beta_map_id_2"
            ),
        "NIDMBundle": dict(
            bundle_id="niiri:spm_results_id",
            label="NIDM-Results",
            object_model="nidm:NIDM_0000027",
            version="1.1.0",
            time="2014-05-19T10:30:00.000+01:00",
            export_id="niiri:export_id"
            ),
        "SPM_ReselsPerVoxelMap": dict(
            resels_per_voxel_map_id="niiri:resels_per_voxel_map_id",
            label="Resels per Voxel Map",
            location="ReselsPerVoxel.nii.gz",
            filename="ReselsPerVoxel.nii.gz",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="2025dc6c33708b80708c2eba3215fb1149df236fb558a8e8f8f6cf34595fb\
54734fe5e436db3e192a424d99699dd7feb2f4a9020ceae8e7bcbd881b17825256a",
            model_pe_id="niiri:model_pe_id"
            ),
        "SPM_InferenceUsedRPVMap": dict(
            inference_id="niiri:inference_id",
            resels_per_voxel_map_id="niiri:resels_per_voxel_map_id"
        ),
        "DerivedMap-RPVMap": dict(
            derived_from_map_id="niiri:resels_per_voxel_map_id_der",
            derived_map_type="nidm:NIDM_0000144",
            filename="RPV.nii",
            format="image/nifti",
            sha="963283cdde607c40e4640c27453867bd0d70133b6d61482933862487c0f4a\
5acdb2e338a12a2605ee044b1aa47b5717f0c520b90ed3c49b5227f0483bd48512d",
            map_id="niiri:resels_per_voxel_map_id"
            ),
        "ClusterLabelsMap": dict(
            cluster_label_map_id="niiri:cluster_label_map_id",
            location="ClusterLabels.nii.gz",
            filename="ClusterLabels.nii.gz",
            format="image/nifti"
            ),
        "SPM_Software": dict(
            software_id="niiri:software_id",
            software_type="nlx:nif-0000-00343",
            label="SPM",
            version="12.12.1"
            ),
        "Image": dict(
            image_id="niiri:maximum_intensity_projection_id",
            location="MaximumIntensityProjection.png",
            filename="MaximumIntensityProjection.png",
            format="image/png"
            ),
        "GrandMeanMap": dict(
            grand_mean_map_id="niiri:grand_mean_map_id",
            label="Grand Mean Map",
            location="GrandMean.nii.gz",
            filename="GrandMean.nii.gz",
            format="image/nifti",
            masked_median="132.008995056152",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="4d3528031bce4a9c1b994b8124e6e0eddb9df90b49c84787652ed94df8c14\
c04ec92100a2d8ea86a8df24ba44617aca7457ddcb2f42253fc17e33296a1aea1cb",
            model_pe_id="niiri:model_pe_id"
            ),
        "ExporterSoftware": dict(
            software_id="niiri:exporter_id",
            software_type="nidm:NIDM_0000168",
            label="spm_results_nidm",
            version="12b.5858"
            ),
        "Export": dict(
            export_id="niiri:export_id",
            label="NIDM-Results export",
            exporter_id="niiri:exporter_id"
            )
        }

    NIDM_SPM_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'spm', "example001")
    ttl_file = os.path.join(NIDM_SPM_DIR, 'example001_spm_results.ttl')
    example = ExampleFromTemplate(nidm_classes, ttl_file, False)
    example.create_example()
开发者ID:adshereen,项目名称:nidm,代码行数:101,代码来源:create_spm_example_001.py

示例13: main


#.........这里部分代码省略.........
            cluster_label_id="1",
            cluster_size_in_resels="23.1209189500945",
            p_value_unc="9.56276736481136e-52",
            p_value_fwe="0",
            p_value_fdr="7.65021389184909e-51",
            excursion_set_id="niiri:excursion_set_map_id"
            ),
        "Peak_ValueP": dict(
            peak_id="niiri:peak_0001",
            label="Peak 0001",
            location="niiri:coordinate_0001",
            value="13.9346199035645",
            equiv_z="INF",
            p_uncorr="4.44089209850063e-16",
            p_value_fwe="0",
            p_value_fdr="6.3705194444993e-11",
            cluster_id="niiri:significant_cluster_0001"
            ),
        "Coordinate": dict(
            coordinate_id="niiri:coordinate_0001",
            label="Coordinate: 0001",
            coord="[ -60, -28, 13 ]"
            ),
        "SearchSpaceMaskMap": dict(
            search_space_id="niiri:search_space_mask_id",
            location="file:///path/to/SearchSpaceMask.nii.gz",
            filename="SearchSpaceMask.nii.gz",
            label="Search Space Mask Map",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_2",
            expected_num_voxels="0.553331387916112",
            expected_num_clusters="0.0889172687960151",
            height_critical_fwe05="5.23529984739211",
            height_critical_fdr05="6.22537899017334",
            smallest_size_fwe05="1",
            smallest_size_fdr05="3",
            search_vol_voxels="65593",
            search_vol_units="1771011",
            resel_size="22.9229643140043",
            search_vol_resels="2552.68032521656",
            search_vol_resels_geom="[3, 72.3216126440484, 850.716735116472, \
2552.68032521656]",
            noise_fwhm_in_voxels="[ 2.95881189165801, 2.96628446669584, \
2.61180425626264 ]",
            noise_fwhm_in_units="[ 8.87643567497404, 8.89885340008753, \
7.83541276878791 ]",
            random_field_station="false",
            sha="e43b6e01b0463fe7d40782137867a...",
            inference_id="niiri:inference_id"
            ),
        "FSL_ClusterCenterOfGravity": dict(
            center_of_gravity_id="niiri:center_of_gravity_1",
            location="niiri:coordinate_0001",
            label="Center of gravity",
            cluster_id="niiri:significant_cluster_0001",
            ),
        "CoordinateSpace": dict(
            coordinate_space_id="niiri:coordinate_space_id_1",
            label="Coordinate space 1",
            voxel_to_world_mapping="[[-3, 0, 0, 78],[0, 3, 0, -112],\
[0, 0, 3, -50],[0, 0, 0, 1]]",
            voxel_units="[ \\\"mm\\\", \\\"mm\\\", \\\"mm\\\" ]",
            voxel_size="[ 3, 3, 3 ]",
            coord_system="nidm:NIDM_0000051",
            number_of_dim="3",
            dimensions="[ 53, 63, 46 ]"),
        "Image": dict(
            image_id="niiri:maximum_intensity_projection_id",
            location="file:///path/to/MaximumIntensityProjection.png",
            filename="MaximumIntensityProjection.png",
            format="image/png"
            ),
        "GrandMeanMap": dict(
            grand_mean_map_id="niiri:grand_mean_map_id",
            label="Grand Mean Map",
            location="file:///path/to/GrandMean.nii.gz",
            filename="GrandMean.nii.gz",
            format="image/nifti",
            masked_median="115",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="e43b6e01b0463fe7d40782137867a...",
            model_pe_id="niiri:model_pe_id"
            ),
        "SPM_DriftModel": dict(
            id="niiri:drift_model_id",
            label="SPM's DCT Drift Model",
            cut_off="128"
            ),
        "FSL_DriftModel": dict(
            id="niiri:drift_model_id",
            label="FSL's Gaussian Running Line Drift Model",
            cut_off="2"
            )
        }

    NIDM_TERMS_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'terms')
    EX_DIR = os.path.join(NIDM_TERMS_DIR, 'examples')
    example = ExampleFromTemplate(nidm_classes, EX_DIR, True)
    example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:101,代码来源:create_term_examples.py

示例14: main


#.........这里部分代码省略.........
            label="Inference 1",
            alternative_hyp="nidm:NIDM_0000060",
            stat_map_id="niiri:statistic_map_id",
            height_thresh_id="niiri:height_threshold_id",
            extent_thresh_id="niiri:extent_threshold_id",
            display_mask_id="niiri:display_map_id",
            peak_def_id="niiri:peak_definition_criteria_id",
            cluster_def_id="niiri:cluster_definition_criteria_id",
            mask_id="niiri:mask_id_1",
            software_id="niiri:software_id",
        ),
        "Inference-2": dict(
            inference_id="niiri:inference_id_2",
            label="Inference 2",
            alternative_hyp="nidm:NIDM_0000060",
            stat_map_id="niiri:statistic_map_id_2",
            height_thresh_id="niiri:height_threshold_id_2",
            extent_thresh_id="niiri:extent_threshold_id_2",
            display_mask_id="niiri:display_map_id_2",
            peak_def_id="niiri:peak_definition_criteria_id_2",
            cluster_def_id="niiri:cluster_definition_criteria_id_2",
            mask_id="niiri:mask_id_1",
            software_id="niiri:software_id",
        ),
        "ConjunctionInference": dict(
            conj_inference_id="niiri:inference_id_3",
            label="Conjunction Inference 3",
            alternative_hyp="nidm:NIDM_0000060",
            stat_map_id_1="niiri:statistic_map_id",
            stat_map_id_2="niiri:statistic_map_id_2",
            height_thresh_id="niiri:height_threshold_id_3",
            extent_thresh_id="niiri:extent_threshold_id_3",
            display_mask_id="niiri:display_map_id_3",
            peak_def_id="niiri:peak_definition_criteria_id_3",
            cluster_def_id="niiri:cluster_definition_criteria_id_3",
            mask_id="niiri:mask_id_1",
            software_id="niiri:software_id",
        ),
        "DerivedMap-Contrast": dict(
            derived_from_map_id="niiri:contrast_map_id_der",
            derived_map_type="nidm:NIDM_0000002",
            filename="con_0001.nii",
            format="image/nifti",
            sha="e43b6e01b0463fe7d40782137867a...",
            map_id="niiri:contrast_map_id",
        ),
        "NIDMBundle": dict(
            bundle_id="niiri:spm_results_id",
            label="NIDM-Results",
            object_model="nidm:NIDM_0000027",
            version="1.1.0",
            time="2014-05-19T10:30:00.000+01:00",
        ),
        "SPM_ReselsPerVoxelMap": dict(
            resels_per_voxel_map_id="niiri:resels_per_voxel_map_id",
            label="Resels per Voxel Map",
            location="file:///path/to/ReselsPerVoxel.nii.gz",
            filename="ReselsPerVoxel.nii.gz",
            format="image/nifti",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="e43b6e01b0463fe7d40782137867a...",
            model_pe_id="niiri:model_pe_id",
        ),
        "SPM_InferenceUsedRPVMap": dict(
            inference_id="niiri:inference_id", resels_per_voxel_map_id="niiri:resels_per_voxel_map_id"
        ),
        "SPM_InferenceUsedRPVMap-2": dict(
            inference_id="niiri:inference_id_2", resels_per_voxel_map_id="niiri:resels_per_voxel_map_id"
        ),
        "SPM_InferenceUsedRPVMap-3": dict(
            inference_id="niiri:inference_id_3", resels_per_voxel_map_id="niiri:resels_per_voxel_map_id"
        ),
        "DerivedMap-RPV": dict(
            derived_from_map_id="niiri:resels_per_voxel_map_id_der",
            derived_map_type="nidm:NIDM_0000144",
            filename="RPV.nii",
            format="image/nifti",
            sha="e43b6e01b0463fe7d40782137867a...",
            map_id="niiri:resels_per_voxel_map_id",
        ),
        "SPM_Software": dict(
            software_id="niiri:software_id", software_type="nlx:nif-0000-00343", label="SPM", version="12b.5853"
        ),
        "GrandMeanMap": dict(
            grand_mean_map_id="niiri:grand_mean_map_id",
            label="Grand Mean Map",
            location="file:///path/to/GrandMean.nii.gz",
            filename="GrandMean.nii.gz",
            format="image/nifti",
            masked_median="115",
            coordinate_space_id="niiri:coordinate_space_id_1",
            sha="e43b6e01b0463fe7d40782137867a...",
            model_pe_id="niiri:model_pe_id",
        ),
    }

    NIDM_SPM_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "spm", "example002")
    ttl_file = os.path.join(NIDM_SPM_DIR, "spm_results_2contrasts.ttl")
    example = ExampleFromTemplate(nidm_classes, ttl_file, False)
    example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:101,代码来源:create_spm_example_002.py

示例15: main


#.........这里部分代码省略.........
			coordinate_id="niiri:coordinate_0003",
			label="Coordinate 3",
			coord="[ -29.6, -73.8, -16.9 ]",
			coord_in_vox="[ 40, 15, 12 ]",
			),
		"Peak-4": dict(
			peak_id="niiri:peak_0004",
			label="Peak 4",
			p_uncorr="4.462172e-09",
			location="niiri:coordinate_0004",
			equiv_z="5.75",
			cluster_id="niiri:significant_cluster_0001"
			),
		"FSL_Coordinate-4": dict(
			coordinate_id="niiri:coordinate_0004",
			label="Coordinate 4",
			coord="[ 0.791, -87.2, 3.23 ]",
			coord_in_vox="[ 39, 13, 12 ]"
			),
		"Peak-M5": dict(
			peak_id="niiri:peak_0005",
			label="Peak 5",
			p_uncorr="2.178976e-09",
			location="niiri:coordinate_0005",
			equiv_z="5.87",
			cluster_id="niiri:significant_cluster_0002"
			),
		"FSL_Coordinate-5": dict(
			coordinate_id="niiri:coordinate_0005",
			label="Coordinate 5",
			coord="[ 16.1, -96.6, 5.82 ]",
			coord_in_vox="[ 32, 10, 16 ]"
			),
		"Peak-6": dict(
			peak_id="niiri:peak_0006",
			label="Peak 6",
			p_uncorr="8.022392e-09",
			location="niiri:coordinate_0006",
			equiv_z="5.65",
			cluster_id="niiri:significant_cluster_0002"
			),
		"FSL_Coordinate-6": dict(
			coordinate_id="niiri:coordinate_0006",
			label="Coordinate 6",
			coord="[ -25.5, -80.4, 15.3 ]",
			coord_in_vox="[ 28, 7, 16 ]"
			),
		"FSL_SearchSpaceMaskMap": dict(
			search_space_id="niiri:search_space_mask_id",
			location="file://path/to/SearchSpaceMask.nii.gz",
			filename_1="SearchSpaceMask.nii.gz",
			filename_2="mask.nii.gz",
			label="Search Space Mask Map",
			user_defined="false",
			format="image/nifti",
			coordinate_space_id="niiri:coordinate_space_id_2",
			search_vol_voxels="45359",
            search_vol_units="1.93808e+06",
            search_vol_resels="3753.84",			
			resel_size="12.2251",
			noise_roughness="0.384676",
			random_field_station="true",
			sha="400a2f07d99ed9be06577e6ecc89222cf4b688c654bc89067da558e88b73b97dd1b25e6c98f2a735fa0a1409598cff7e6025bda55abb6b9f5ef65d8d307eeba8",
			inference_id="niiri:inference_id",
            noise_fwhm_in_voxels="[2.38803, 2.43263, 2.07288]",
            noise_fwhm_in_units="[8.35811, 8.5142, 7.2551]"
			),
		"NIDMBundle": dict(
			bundle_id="niiri:fsl_results_id",
			label="NIDM-Results",
			object_model="nidm:NIDM_0000027",
			version="1.1.0",
			time="2014-05-19T10:30:00.000+01:00"
			),
		"FSL_Software": dict(
			software_id="niiri:software_id",
			software_type="nlx:birnlex_2067",
			label="FSL",
			version="5.0.x",
			feat_version="6.00"
			),
		"FSL_GrandMeanMap": dict(
			grand_mean_map_id="niiri:grand_mean_map_id",
			label="Grand Mean Map",
			location="file://path/to/GrandMean.nii.gz",
			filename_1="GrandMean.nii.gz",
			filename_2="mean_func.nii.gz",
			format="image/nifti",
			masked_median="115",
			coordinate_space_id="niiri:coordinate_space_id_1",
			sha="e43b6e01b0463fe7d40782137867a...",
			model_pe_id="niiri:model_pe_id"
			)
		}

	NIDM_FSL_DIR = os.path.join(os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))), 'fsl')
	ttl_file = os.path.join(NIDM_FSL_DIR, 'fsl_results.ttl')
	example = ExampleFromTemplate(nidm_classes, ttl_file, False)
	example.create_example()
开发者ID:szho42,项目名称:nidm,代码行数:101,代码来源:create_fsl_example.py


注:本文中的create_example_from_templates.ExampleFromTemplate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。