J2KROIControl Example for Delphi
//insert the image into the element
LEADDicomDS1.Bitmap:= LEADRasterView1.Raster.Bitmap;
LEADDicomDS1.J2KOptions.J2KSetDefaults;
LEADDicomDS1.J2KOptions.J2KCompressionControl:= DICOM_J2K_COMP_RATIO;
LEADDicomDS1.J2KOptions.J2KCompressionRatio:= 100;
LEADDicomDS1.J2KOptions.J2KUseROI:= True;
LEADDicomDS1.J2KOptions.J2KROIControl:= J2K_USEOPTION_RECT;
LEADDicomDS1.J2KOptions.J2KROILeft:= 200;
LEADDicomDS1.J2KOptions.J2KROITop:= 200;
LEADDicomDS1.J2KOptions.J2KROIWidth:= 400;
LEADDicomDS1.J2KOptions.J2KROIHeight:= 400;
LEADDicomDS1.J2KOptions.J2KXTsiz:= 100;
LEADDicomDS1.J2KOptions.J2KYTsiz:= 100;
//set the bitmap
LEADDicomDS1.SetBitmapValue (DICOM_IMAGE_COMPRESSION_J2K_LOSSY,
DICOM_IMAGE_PHOTOMETRIC_MONOCHROME2,
0,
0,
0);