database issue for type inherits directory

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
mreynal
Posts: 2
Joined: Wed Jan 09, 2013 2:42 pm

database issue for type inherits directory

Post by mreynal »

hello,

I have a type that inherits from directory:
FileType ('PET PetSubject Dyn', 'Directory')

Here is his statement in the hierarchy:
insert ('petSubject / {center} / {subject} / pet / {acquisition} / {draw} / {PET_ reconstruction} /', 'dynamic', setType ('PET PetSubject Dyn'), setContent ())

I can make links with this type of parameters and generate the dynamic directory.
However, once the directory exists, this type does not appear as recognized in the database browser, type = None.

If I just create the directory, then I can find it in the database with the interface obtained from button red / green database.
But once I made a data base update, I can not find it anymore in the same interface (probably because its type is None?)

Is this still the case for types 'directory' or there's something there to do?

thank you for your help
moana
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: database issue for type inherits directory

Post by riviere »

Hi Moana,
I think it is because you have not "really defined" the upper-level directories: here you insert into

Code: Select all

'petSubject/{center}/{subject}/pet/{acquisition}/{draw}/{PET_ reconstruction}'
, but you have not defined them.
Using:

Code: Select all

insertFirst( '', 'petSubject', SetContent(
  '{center}', SetContent(
    '{subject}', SetType( 'Subject' ), SetContent(
      'pet', SetContent(
        '{acquisition}', SetContent(
          '{tracer}', SetContent(
            'PET_{reconstruction}', SetContent(),
          ),
        ),
      ),
    ),
  ),
) )
it should work better. But as far as I see in the reopository, you have several hierarchy files using such dirs without defining them. You should define them (as above) in one of the files, and then make the others depend on this first one.

Denis
mreynal
Posts: 2
Joined: Wed Jan 09, 2013 2:42 pm

Re: database issue for type inherits directory

Post by mreynal »

works fine, thank you
Post Reply