Images management
Images are managed by the table syd::Image. This table basically contains meta-information about the images (patient, size, type, spacing, etc) and link to files in the database folder. Loading an image as an itk image object is simple. Helper functions grouped in the class syd::ImageHelper are provided to create and update images. Additional classes (tables) inherited from syd::Image allow to manage specific images types such as syd::RoiMaskImage or syd::DicomSerie.
Class table syd:Image
All images are linked to a syd::Patient, this is required. Images may be linked to injection, and dicoms.
When an image is stored in the database (persist), the file is usually in the folder with the patient name and named <modality>_<id>.mhd pattern. Warning, if the image is updated, for example by changing the modality, the filename is not updated.
When an image is deleted, the associated syd::File are also deleted. This is perform in syd::Image::Callback.
Functions to manage images are gathered in the syd::ImageHelper.h file.
Functions to create & insert an image:
InsertImageFromFile: from a mhd filenameInsertImage: from a itk image pointerInsertImageFromDicomSerie: from a DicomSerieInsertStitchDicomImage: from two DicomSerie
Functions to set image properties:
SetImageInfoFromFile: set properties from the associated syd::File (image size etc)SetImageInfoFromImage: set properties from another imageSetImageInfoFromDicomSerie: set properties from a DicomSerieSetImageInfoFromCommandLine: set properties from args command line (templated)SetPixelUnit: set the pixel unit from stringSetInjection: set the injection from a stringAddDicomSerie: add a DicomSerie in the list