Difference between revisions of "Adding models to catalogued volumes"
Line 8: | Line 8: | ||
While this will work for many functionalities, this is not totally correct, as the catalogue needs to preserve some internal links. | While this will work for many functionalities, this is not totally correct, as the catalogue needs to preserve some internal links. | ||
− | # Assign the model with | + | # Assign the model with the {{t|dcm}} command {{docfunction|dynamo_catalogue_manager|dcm}} |
#: {{t|dcm -c myCatalogue -l 2 -am myModel.omd}} | #: {{t|dcm -c myCatalogue -l 2 -am myModel.omd}} | ||
− | #: for a models contained in a file {{t|myModel.omd} | + | #: for a models contained in a file {{t|myModel.omd}}, or |
#: {{t|dcm('-c', 'myCatalogue', '-l', 2 ,'-am', m}} | #: {{t|dcm('-c', 'myCatalogue', '-l', 2 ,'-am', m}} | ||
#: if the model is contained is an workspace object {{t|m}} | #: if the model is contained is an workspace object {{t|m}} |
Revision as of 09:34, 27 April 2016
A file representing a model created on a catalogued tomogram will be stored in a predefined position. For instance, a model named someModel created by Dynamo in one of its catalogue-based tomogram viewers for the volume indexed as 2 in a catalogue named my Catalogue will be automatically stored in the position:
myCatalogue /volume_2/models/someModel.omd
Now, if you have produced a model object myModel independently of the catalogue system, and want to embed it and assign it to a catalogued tomogram, you might have the temptation of just saving it as
dwrite(myModel,'myCatalogue /volume_2/models/myModel.omd').
While this will work for many functionalities, this is not totally correct, as the catalogue needs to preserve some internal links.
- Assign the model with the dcm command dcm
- dcm -c myCatalogue -l 2 -am myModel.omd
- for a models contained in a file myModel.omd, or
- dcm('-c', 'myCatalogue', '-l', 2 ,'-am', m
- if the model is contained is an workspace object m
- Alternatively, you can tell the catalogue to relink all the files found in the models folder of one or more volumes.
- dcm -c myCatalogue --relinkAllModelFiles
- XX: not yet implemented!
Technical information
The link between a model and its 'volume' entry happens over the property cvolume in the model object. If you want to imitate manually the action of the flag am, you just need to extract the corresponding 'cvolume' object of the catalogue and assign it to the 'cvolume' property of the model before saving it.