Accusoft.ImagXpressSdk Namespace > Processor Class > ApplyGrayscaleTransform Method : ApplyGrayscaleTransform(Medical) Method |
Exception | Description |
---|---|
ProcessorException | A processor exception. |
Some images describe more shades of gray than the human eye can discriminate. It is widely held that 256 shades are discernable. This method uses a range and area of values you are interested in to select the 256 grays.
This method should only be used when the DICOM specific information is available.
In order to further process or save 9-bit to 16-bit grayscale images, this method may need to be called first.
Note: Available in Professional edition.
// create the processor class Accusoft.ImagXpressSdk.Processor processor = new Accusoft.ImagXpressSdk.Processor( ); // associate it with a 8 to 16 bit per pixel image processor.Image = highGrayImageX; // create a medical object and fill in the DICOM information explicitly Accusoft.ImagXpressSdk.Medical medical = new Accusoft.ImagXpressSdk.Medical( ); medical.WindowWidth = 128.0; medical.WindowCenter = 128.0; // apply the medical grayscale transform processor.ApplyGrayscaleTransform( medical );