I would like to import spectroscopy quantification files to the BrainVisa hierarchy.
In shfjHierarchy.py, I've first add this :
Code: Select all
'd|quantif', SetWeakAttr( 'category', 'spectroscopy' ), SetContent(
'<subject>_quantif', SetType( 'Spectroscopy Results' ),
'<subject>_quantif', SetType( 'jMRUI Quantification File' ),
Then, in my process signature and initialization function :
Code: Select all
name = 'ImportjMRUIQuantification'
userLevel=0
signature=Signature(
'quantif', ReadDiskItem( 'jMRUI Quantification File', 'Text File' ),
'rda', ReadDiskItem( 'Raw Data Spectroscopy Siemens', 'RDA File' ),
'nomMetabolite1', String(),
'nomMetabolite2', String(),
'nomMetabolite3', String(),
'metabolite_map_1', WriteDiskItem( 'Metabolite Map', 'GIS image'),
'metabolite_map_2', WriteDiskItem( 'Metabolite Map', 'GIS image'),
'metabolite_map_3', WriteDiskItem( 'Metabolite Map', 'GIS image'),
)
def initialization( self ):
self.linkParameters( 'nomMetabolite1', 'metabolite_map_1' ),
self.linkParameters( 'nomMetabolite2', 'metabolite_map_2' ),
self.linkParameters( 'nomMetabolite3', 'metabolite_map_3' ),
My questions are :
- 1) How to allow the creation of a new subject and a new protocol in the database file interface when clicking on a WriteDiskItem "magnifing glass" in the process window ?
2) My variables "nomMetabolite*" and "metabolite_map_*" are not linked. When I filled out "nomMetabolite*" and click and the red button of my WriteDiskItem "metabolite_map_*", no automatic name is proposed. Is something wrong or missing in my code ?
3) I'm quite confusing with "findValue" and more generally with how the database is working, and there is no documentation for this topic, despite few messages on this forum. Does someone had written stuff on it ? (I've read that Manik had)
Sincerely,
Matthieu