The BitmapToNde example demonstrates how to use the DCF to create a ultrasound dataset for use in the Non-Destructive Evaluation (NDE)
scenarios. A custom tag dictionary with the NDE tag overrides is also provided.
Classes
Class | Description | |
---|---|---|
Histogram |
A histogram class ultimately used to calculate a window center and width for monochrome images.
| |
NDETags |
DICONDE tag constants.
| |
Options |
A class for BitmapToNde program options.
| |
Program |
An example program to demonstrate how to create a DICONDE non-destructive evaluation (NDE) dataset from a bitmap file.
| |
RgbToMono |
A class that facilitates the conversion of 24 bit RGB pixel values to monochrome.
| |
USImage |
An example USImage class to demonstrate loading and or creating a DICONDE image.
|
Examples
BitmapToNde Sample Code
public class Program { private static readonly ILogger Logger = LogManager.GetCurrentClassLogger(); /// <summary> /// Main entry point for BitmapToNde. /// </summary> /// <param name="args">command line arguments</param> [STAThread] static void Main(string[] args) { int status = 1; try { Options options; if (!Options.TryParse(args, out options)) return; USImage usImage = USImage.LoadImage(options); // Modify usImage to add demographics usImage.ComponentName = new DicomPNElement(NDETags.ComponentName, "my component name"); usImage.Save(options.DicomPath, options.TransferSyntax); status = 0; } catch (Exception e) { Logger.Error(e, "Exception caught during execution:"); status = 2; } finally { if (System.Diagnostics.Debugger.IsAttached) { Console.Write("Press any key to continue . . . "); Console.ReadKey(); } } Environment.Exit(status); } }