J2KCompressionControl Example for Delphi

   LEADDicomDS1.InitDS (DICOM_CLASS_CR_IMAGE_STORAGE,
                       DS_EXPLICIT_VR + DS_METAHEADER_ABSENT + DS_LITTLE_ENDIAN);
   //insert the image into the element
   LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;

   // Use the Q factor for compression control.
   LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_QFACTOR;

   //set the bitmap
   LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
                               DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
                               0,
                               100,
                               0);