Ejemplo n.º 1
0
 def test_wrong_atlas_input(self):
     subject_nii_path = 'test_subject.nii'
     mean_nii_path = 'test_mean.nii'
     sd_nii_path = 'test_sd.nii'
     atlas_nii_path = 'test_atlas_wrong_size.nii'
     sa = zscores.SubjectAnalyzer(subject_nii_path,mean_nii_path,sd_nii_path,atlas_nii_path)
     assert (~sa.is_data_proper) and (~sa.is_atlas_proper)
Ejemplo n.º 2
0
 def test_area_values(self):
     subject_nii_path = 'test_subject.nii'
     mean_nii_path = 'test_mean.nii'
     sd_nii_path = 'test_sd.nii'
     atlas_nii_path = 'test_atlas.nii'
     sa = zscores.SubjectAnalyzer(subject_nii_path,mean_nii_path,sd_nii_path,atlas_nii_path)
     assert (np.round(sa.area_data.iloc[0,0],2) == -0.36)
Ejemplo n.º 3
0
 def test_correct_subject_input(self):
     subject_nii_path = 'test_subject.nii'
     mean_nii_path = 'test_mean.nii'
     sd_nii_path = 'test_sd.nii'
     atlas_nii_path = 'test_atlas.nii'
     sa = zscores.SubjectAnalyzer(subject_nii_path,mean_nii_path,sd_nii_path,atlas_nii_path)
     assert (sa.shape == (4,4,4))
Ejemplo n.º 4
0
 def test_zscores(self):
     subject_nii_path = 'test_subject.nii'
     mean_nii_path = 'test_mean.nii'
     sd_nii_path = 'test_sd.nii'
     atlas_nii_path = 'test_atlas.nii'
     sa = zscores.SubjectAnalyzer(subject_nii_path,mean_nii_path,sd_nii_path,atlas_nii_path)
     assert (sa.zscores[2,3,1] == -3)