UPDATE:
Me and Boris discussed the issue privately through email, and with the help of one of our engineers and Travis, we were able to get a viable solution.
So for any developers out there with a similar issue, can try out the code below. The issue was, the scanner was returning a 12-bit DIB with a 16-bit header information. When calling the RasterImage.FromDib() method, it would create the RasterImage but it would be in BGR byte order instead of Gray byte order. Boris tried to convert the 12bit pixel values to our Leadtools Gray byte order format by applying bit packing. Bit packing requires two 12-bit values, so that means 2 pixels. 1st pixel = 0xABC, 2nd pixel = 0xDEF. The bit-packed value will be 3 bytes, BC, FA, and DE.
Second solution he tried was shifting the data 4 bits to the left to get a 16-bit value. Which worked out, but because of strict medical requirements (cannot alter the original pixel data), he wasn't able to use it. So we looked for a solution from the engineers, and the code below is what we got from Travis and the engineers.
Boris, if you have any corrections or additions, feel free to reply. Thanks.
/// Start of code
RasterSupport.Unlock(RasterSupportType.Medical, "your unlock key");
RasterCodecs.Startup();
RasterCodecs io = new RasterCodecs();
RasterImage img;
// Load image from disk
img = io.Load(Application.StartupPath + "\\..\\..\\Test.bmp");
// Create a new image at 16 bpp Gray (We copy the 12 bits into the 16 bits)
RIV1.Image = new RasterImage(RasterMemoryFlags.Conventional, img.Width, img.Height, img.BitsPerPixel, RasterByteOrder.Gray, img.ViewPerspective, null, IntPtr.Zero, 0);
// Copy Data
CopyDataCommand copy = new CopyDataCommand();
copy.DestinationImage = RIV1.Image;
copy.Run(img);
// Get Min and Max Bits
MinMaxBitsCommand mmBits = new MinMaxBitsCommand();
mmBits.Run(RIV1.Image);
// Get Min and Max Values
MinMaxValuesCommand mmVals = new MinMaxValuesCommand();
mmVals.Run(RIV1.Image);
// Set Images' Min and Max bits
RIV1.Image.LowBit = mmBits.MinimumBit;
RIV1.Image.HighBit = mmBits.MaximumBit;
// Window Level image for viewing.
ApplyLinearVoiLookupTableCommand wl = new ApplyLinearVoiLookupTableCommand();
wl.Flags = VoiLookupTableCommandFlags.None;
wl.Width = mmVals.MaximumValue - mmVals.MinimumValue;
wl.Center = wl.Width / 2;
wl.Run(RIV1.Image);
RasterCodecs.Shutdown();
/// End of code