Hi,
I am new to Leadtools. I want to
1.compress a DICOM raw filw to JPEG lossless and
2. decompress different Compressed DICOM files (such as JPEGLossless, JPEGlossy, JPEG2000, JPEG2000 losses, RLE etc.)
to DICOM raw file.
I tried to used the method ChangeTransferSyntax which only changes the any transfered syntax to desired one. However this method does not compress any file in pixel. Thus a raw dicom file compressed is just any raw filw with changed tranfer syntax file.
I saw some example for using StartCompress, Compress, StopCompress for Compression
(
http://www.leadtools.com...ompress.html )
and StartDecompress, Decompress, StopDecompress for Decompression of Tiff file
(http://www.leadtools.com/help/leadtools/v15/DH/CO/Leadtools.Codecs~Leadtools.Codecs.RasterCodecs~Decompress(Object,Byte[],Int32,Int32,Int32,Int32,Int32,Int32,CodecsDecompressDataFlags).html)
I tried the above code however there are some parameters which i am not sure about JPEG
My problems are as follows
For Compression to Jpeg Lossless:
1. what will be the following line specialythe bold ones
codecs.Options.Jpeg.Save.CmpQualityFactorPredefined = CodecsCmpQualityFactorPredefined.QualityAndSize;
2. what is the CodecsCompression in the following line
codecs.StartCompress(
image.Width,
image.Height,
image.BitsPerPixel,
image.Order,
image.ViewPerspective,
16 * lineBytes,
outBuffer,
0,
outBuffer.Length,
CodecsCompression.Cmp,
MyCodecsCompressDataCallback);
3. how do i call the MyCodecsCompressDatacallBack method. is it with an object of RasterCodecs
For Decompression to DICOM raw:
1. What will be the values for Raw dicom for the following bold ones
CodecsStartDecompressOptions options = CodecsStartDecompressOptions.Empty;
options.DataType = CodecsStartDecompressDataType.Strips;
options.Format = RasterImageFormat.RawPackBits; // specially this one
options.Width = imageInfo.Width;
options.Height = imageInfo.Height;
options.BitsPerPixel = imageInfo.BitsPerPixel;
options.ViewPerspective = imageInfo.ViewPerspective;
options.RawOrder = imageInfo.Order;
options.LoadOrder = CodecsLoadByteOrder.BgrOrGray; // specially this one
options.XResolution = imageInfo.XResolution;
options.YResolution = imageInfo.YResolution;
options.TiffPhotometricInterpretation = CodecsTiffPhotometricInterpretation.Rgb; // do i need this line as it is for tiff file format?
when i remove it i get error.
2. with what saving option can i save my output file for DICOM raw
codecs.Save(image, destRawDicomFilename, RasterImageFormat.Raw, 24);
I really appreciate any help
Thanks in advance