Exemplo n.º 1
0
 def __init__(self, prefix='', project_id=None):
     super(ZIPSurfaceImporterForm, self).__init__(prefix, project_id)
     self.uploaded = UploadField('application/zip', self, name='uploaded', required=True, label='Surface file (zip)')
     self.surface_type = SimpleSelectField(ALL_SURFACES_SELECTION, self, name='surface_type', required=True,
                                           label='Surface type', default=list(ALL_SURFACES_SELECTION)[0])
     self.zero_based_triangles = SimpleBoolField(self, name='zero_based_triangles', default=True,
                                                 label='Zero based triangles')
     self.should_center = SimpleBoolField(self, name='should_center',
                                          label='Center surface using vertex means along axes')
Exemplo n.º 2
0
 def __init__(self, prefix='', project_id=None):
     super(ConnectivityCreatorForm, self).__init__(prefix, project_id)
     self.original_connectivity = DataTypeSelectField(
         self.get_required_datatype(),
         self,
         required=True,
         name='original_connectivity',
         label='Parent connectivity',
         conditions=self.get_filters())
     self.new_weights = SimpleArrayField(self,
                                         name='new_weights',
                                         dtype=numpy.float,
                                         required=True,
                                         label='Weights json array')
     self.new_tracts = SimpleArrayField(self,
                                        name='new_tracts',
                                        dtype=numpy.float,
                                        required=True,
                                        label='Tracts json array')
     self.interest_area_indexes = SimpleArrayField(
         self,
         name='interest_area_indexes',
         dtype=numpy.int,
         required=True,
         label='Indices of selected nodes as json array')
     self.is_branch = SimpleBoolField(self,
                                      required=False,
                                      name='is_branch',
                                      label='Is it a branch')
Exemplo n.º 3
0
    def __init__(self, prefix='', project_id=None):
        super(GIFTISurfaceImporterForm, self).__init__(prefix, project_id)
        surface_types = ALL_SURFACES_SELECTION.copy()
        surface_types['Specified in the file metadata'] = OPTION_READ_METADATA

        self.file_type = SimpleSelectField(surface_types,
                                           self,
                                           name='file_type',
                                           required=True,
                                           label='Specify file type : ',
                                           default=list(surface_types)[0])
        self.data_file = UploadField(
            '.gii',
            self,
            name='data_file',
            required=True,
            label='Please select a .gii (LH if cortex)')
        self.data_file_part2 = UploadField(
            '.gii',
            self,
            name='data_file_part2',
            label="Optionally select 2'nd .gii (RH if cortex)")
        self.should_center = SimpleBoolField(
            self,
            name='should_center',
            default=False,
            label='Center surface using vertex means along axes')
Exemplo n.º 4
0
    def __init__(self, prefix='', project_id=None):
        super(NIFTIImporterForm, self).__init__(prefix, project_id)

        self.data_file = UploadField(
            '.nii, .gz, .zip',
            self,
            name='data_file',
            required=True,
            label='Please select file to import (gz or nii)')
        self.apply_corrections = SimpleBoolField(
            self,
            name='apply_corrections',
            label='Apply auto Corrections',
            doc='Check this when the NII mapping has values outside [-1..N-1]. '
            'All outside range will be set -1 (background).')
        self.mappings_file = UploadField(
            '.txt',
            self,
            name='mappings_file',
            label='Mapping File',
            doc=
            'Fill this for Region Mappings, when the indices in the NII do not match '
            'the Connectivity [0..N-1] indices')
        self.connectivity = DataTypeSelectField(
            ConnectivityIndex,
            self,
            name='connectivity',
            label='Connectivity',
            doc=
            'Optional Connectivity if the NII file is a volume2regions mapping'
        )
Exemplo n.º 5
0
    def __init__(self, prefix='', project_id=None):
        super(ObjSurfaceImporterForm, self).__init__(prefix, project_id)

        self.surface_type = SimpleSelectField(ALL_SURFACES_SELECTION, self, name='surface_type', required=True,
                                              label='Specify file type :', default=list(ALL_SURFACES_SELECTION)[0])
        self.data_file = UploadField('.obj', self, name='data_file', required=True,
                                     label='Please select file to import')
        self.should_center = SimpleBoolField(self, name='should_center', default=False,
                                             label='Center surface using vertex means along axes')
Exemplo n.º 6
0
 def __init__(self, prefix='', project_id=None):
     super(MatTimeSeriesImporterForm, self).__init__(prefix, project_id)
     self.data_file = UploadField('.mat',
                                  self,
                                  name='data_file',
                                  required=True,
                                  label='Please select file to import')
     self.dataset_name = SimpleStrField(
         self,
         name='dataset_name',
         required=True,
         label='Matlab dataset name',
         doc='Name of the MATLAB dataset where data is stored')
     self.structure_path = SimpleStrField(
         self,
         name='structure_path',
         default='',
         label='For nested structures enter the field path (separated by .)'
     )
     self.transpose = SimpleBoolField(
         self,
         name='transpose',
         default=False,
         label='Transpose the array. Expected shape is (time, channel)')
     self.slice = SimpleStrField(
         self,
         name='slice',
         default='',
         label=
         'Slice of the array in numpy syntax. Expected shape is (time, channel)'
     )
     self.sampling_rate = SimpleIntField(self,
                                         name='sampling_rate',
                                         default=100,
                                         label='sampling rate (Hz)')
     self.start_time = SimpleIntField(self,
                                      name='start_time',
                                      default=0,
                                      label='starting time (ms)',
                                      required=True)