The MDM commands

The MDM commands are in the /opt/MDM/bin directory. You should add it to your PATH. All the commands have a -h/–help flag that may help you to use them.

How to register a DICOM picture in the Medical Data Manager ?

The command line to register a DICOM picture is easy to use. The mandatory parameter is the pathname of the DICOM picture (for example : /home/user/Imager/DicomPicture.dcm ). The three other parameters define the level of verbosity. Without any verbosity option, there is no output in case of success.

Usage:

glite-mdm-register [--quiet/-q] [--verbose/-v] [--debug/-d] <DICOM file>

How to retrieve a DICOM picture from the Medical Data Manager ?

The glite-mdm-get command could be used to retrieve a DICOM picture stored in a MDM.

Usage: 
glite-mdm-get <study> <serie> <sop> <filename>
glite-mdm-get <study/serie/sop> <filename>
glite-mdm-get -l <lfn> <filename>
glite-mdm-get -g <guid> <filename>
glite-mdm-get -h/--help

<filename> is a local filename (per example /home/user/medical-picture/new-dicom.dcm) where the retrieved file will be stored. You must have the write permission in the parent directory.
<study> <series> <sop> are the Study Instance UID, the Serie Instance UID and the SOP Instance UID with a space between the values.
<study/series/sop> are the Study Instance UID, the Serie Instance UID and the SOP Instance UID with a slash “/” between the values with an optional slash at the beginning.

You can also use the usual gLite command line to get the DICOM picture. In this case you will need to use the glite-eds-decypher command to decipher the file.

lcg-cp <LFN> <filename-encypted>
glite-eds-decypher </study/serie/sop> <filename-encypted> <filename>

How to modify the permission of a DICOM picture ?

The glite-mdm-set-right command modify the permission of a DICOM picture, who has been registered in a MDM.

Usage

				glite-mdm-set-right  		[-v|--verbose]  [-d|--debug] [-h|--help]
								[ [-l|--lfn|-f|--file]  <DICOM image> ] 
								[ -s|--sop <Study instance UID>, <Series instance UID>, <SOP instance UID> ] 
								[rwxrwxrwx]  [private|group|anonymous|public]
								[ -u|--user <DN> <group> <rwx> <none|anonymous|all> ] 



Description

  • -v / –verbose this software will be verbose.


  • -d / –debug this software will display debug information. It includes –verbose


  • -h / –help this software will display the usage of this command line and will not execute any other action.


  • One of this five options is mandatory. This options specify the DICOM picture.
    1. -l / –lfn <DICOM image>
    2. -f / –file <DICOM image>
    3. lfn:<LFN>
    4. file:<local pathname>
    5. -s / –sop <Study instance UID>,<Series instance UID>,<SOP instance UID>


  • At least one action is mandatory. An action is a permission to set. All the actions can be done simultaneously by one command. The permission in the format (rwx) affect the possibility to read the file. The permission in the format (private/group/etc) concern the metadata. There are four actions :

1) rwxrwxrwx This action set the permission of the DICOM picture in the LFC, Hydra and DPM server. It also sets the permission of the directory in the LFC and DPM. Hydra does not have directory.The rwxrwxrwx has the standard meaning.

  • r : allow to read the DICOM picture and the directory
  • w : allow to write the DICOM picture and the directory
  • x : allow to go into the directory
  • - : the right is not set.

The first (rwx) selects permissions for the user who owns the file. The second (rwx) selects permissions for the users of the same VO. The third (rwx) selects permissions for other users.

2) private / group / anonymous / public
This option specifies the permission of the metadata, who are stored in the AMGA server.

  • private : Only the user could read the metadata. Other users can't read it.
  • anonymous : Only the user can read the most sensitive metadate (name, etc). The other metadata could be read by any user of the same VO.
  • group : The metadata are classified in different levels. The most sensitive metadata will only be read by the user and the physicians. The medical image analyst could read most of the metadata, but the most sensitive metadata. Any other user can read the metadata.
  • public : Anyone could read all the metadata.


3) -u / –user <DN> <group> <rwx> <none|anonymous|all|group>
The action set the permission for an individual user. The user is specify by his DN, who is the Distinguish Name used by EGEE and his AMGA group. The (rwx) permission is his right access to the LFC, Hydra and DPM servers. The none|anonymous|all|group permission is his right access to metadata.

  • none : the user can't read any metadata
  • anonymous : the user can only read not sensitive metadata.
  • all : the user could read all the metadata.


Example :

  • glite-mdm-set-right rwx—— private –file /home/user/patient.9.september.dicom

The DICOM picture could only be retrieved or written by the owner of the DICOM picture. He is the only one who can read the metadata. The DICOM picture is the DICOM image, which has been registered in the MDM by using the file home/user/patient.9.september.dicom

  • glite-mdm-set-right rwxr-x— group –lfn /grid/biomed/mdm/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434532.06

The owner of the file allows the VO's users to read the file. The physician could read all the metadata. The MIA can't read confidential metadata. The DICOM picture is the DICOM image, who could be retreived by the LFN (/grid/biomed/mdm/1.2.826.0…).

  • glite-mdm-set-right rwxr-x— file:/home/user/patient.9.september.dicom

The owner of the file allows the VO's users to read the file. The permission of the metadata is not modified.

  • glite-mdm-set-right -v public lfn:/grid/biomed/mdm/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434532.06

The owner of the file allows all the users to read the metadata of this file. The permission to retrieve the DICOM file is not modified. The command will display some information.

  • glite-mdm-set-right –debug –user “/O=GRID-FR/C=FR/O=CNRS/OU=I3S/CN=Romain Texier” mdmadmin:mia r-x anonymous -f /home/user/patient.9.september.dicom

The owner of the file allows one user to read the DICOM picture. This user could only read the least sensitive metadata. The command will display all the information that will be displayed in verbose mode. It will also display specific debug information.

How to modify the permission of a DICOM picture ?

The glite-mdm-set-right command modifies the permission of a DICOM picture, who has been registered in a MDM.

Usage

		glite-mdm-set-right  		[-v|--verbose]  [-d|--debug] [-h|--help]
						[ [-l|--lfn|-f|--file]  <DICOM image> ] 
						[ -s|--sop <Study instance UID>, <Series instance UID>, <SOP instance UID> ] 
						[rwxrwxrwx]  [private|group|anonymous|public]
						[ -u|--user <DN> <group> <rwx> <none|anonymous|all> ] 



Description

  • -v / –verbose this software will be verbose.


  • -d / –debug this software will display debug information. It includes –verbose


  • -h / –help this software will display the usage of this command line and will not execute any other action.


  • One of this five options is mandatory. This options specify the DICOM picture.
    1. -l / –lfn <DICOM image>
    2. -f / –file <DICOM image>
    3. lfn:<LFN>
    4. file:<local pathname>
    5. -s / –sop <Study instance UID>,<Series instance UID>,<SOP instance UID>


  • At least one action is mandatory. An action is a permission to set. All the actions can be done simultaneously by one command. The permission in the format (rwx) affect the possibility to read the file. The permission in the format (private/group/etc) concern the metadata. There is four actions :

1) rwxrwxrwx This action set the permission of the DICOM picture in the LFC, Hydra and DPM server. It also set the permission of the directory in the LFC and DPM. Hydra does not have directory.The rwxrwxrwx has the standard meaning.

  • r : allow to read the DICOM picture and the directory
  • w : allow to write the DICOM picture and the directory
  • x : allow to go into the directory
  • - : the right is not set.

The first (rwx) selects permissions for the user who owns the file. The second (rwx) selects permissions for the users of the same VO. The third (rwx) selects permissions for other users.

2) private / group / anonymous / public
This option specify the permission of the metadata, who are stored in the AMGA server.

  • private : Only the user could read the metadata. Other users can't read it.
  • anonymous : Only the user can read the most sensitive metadate (name, etc). The other metadata could be read by any user of the same VO.
  • group : The metadata are classified in different level. The most sensitive metadata will only be read by the user and the physicians. The medical image analyst could read most of the metadata, but the most sensitive metadata. Any other user can read the metadata.
  • public : Anyone could read all the metadata.


3) -u / –user <DN> <group> <rwx> <none|anonymous|all|group>
The action set the permission for an individual user. The user is specify by his DN, who is the Distinguish Name used by EGEE and his AMGA group. The (rwx) permission is his right access to the LFC, Hydra and DPM servers. The none|anonymous|all|group permission is his right access to metadata.

  • none : the user can't read any metadata
  • anonymous : the user can only read not sensitive metadata.
  • all : the user could read all the metadata.


Example :

  • glite-mdm-set-right rwx—— private –file /home/user/patient.9.september.dicom

The DICOM picture could only be retrieve or write by the owner of the DICOM picture. He is the only one who can read the metadata. The DICOM picture is the DICOM image, who have been registered in the MDM by using the file home/user/patient.9.september.dicom

  • glite-mdm-set-right rwxr-x— group –lfn /grid/biomed/mdm/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434532.06

The owner of the file allow the VO's users to read the file. The physician could read all the metadata. The MIA can't read confidential metadata. The DICOM picture is the DICOM image, who could be retreive by the LFN (/grid/biomed/mdm/1.2.826.0…).

  • glite-mdm-set-right rwxr-x— file:/home/user/patient.9.september.dicom

The owner of the file allow the VO's users to read the file. The permission of the metadata is not modified.

  • glite-mdm-set-right -v public lfn:/grid/biomed/mdm/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434503.87/1.2.826.0.1.3680043.2.1143..20060202124434532.06

The owner of the file allow all the users to read the metadata of this file. The permission to retrieve the DICOM file ais not modified. The command will display some information.

  • glite-mdm-set-right –debug –user “/O=GRID-FR/C=FR/O=CNRS/OU=I3S/CN=Romain Texier” mdmadmin:mia r-x anonymous -f /home/user/patient.9.september.dicom

The owner of the file allow one user to read the DICOM pictuee. This user could only read the least sensitive metadata. The command will display all the information that will be display in verbose mode. It will also display specific debug information.

How to find a DICOM picture ?

You need to use an amga client. We provide a command line client (mmdclient) and a library (MMDclient API) for user application.