I don't think you need to use the filename to generate the unicity. Your previous schema was fine but lacked an iteration. Andrew mentioned to me this afternoon, you could also introduce your own convention after Annotation:. For instance, the following would generate Annotation:OPT:0, Annotation:OPT:1,...
- Code: Select all
for i = 1:num_files
...
metadata.setCommentAnnotationID(['Annotation:OPT:' num2str(i-1)',i-1);
...
end
As for setting the plane annotation, the corresponding Javadoc is available at here. So I would expect something like this would work:
- Code: Select all
for i = 1:num_files
...
metadata.setPlaneAnnotationRef(['Annotation:OPT:' num2str(i-1)', 0, i-1, 0);
...
end
Sebastien