TWAIN doesn't let you read single lines from the device, it's a much higher-level API than that. Even when TWAIN is transferring buffers of image data, the driver will assume it has to apply various corrections to the data - such as, correcting for non-uniform lighting across the bar, which you would have to model and undo.
I think you'd be much better off searching for a USB interface to a CCD, or some kind of capture card that lets you talk more directly to your sensor. Lots of enthusiasts out there doing things along those lines.