A method of, and a device for, locating a piece with respect to a tool, utilize a measuring device for measuring a feeding speed, a driving direction and a feeding amount of the piece. A phase map structure for the image is formed and any singularities in the phase map structure are removed to create a continuous phase map structure. The reagent flow pass is connected to that end of the specimen flow pass and allows at least one reagent to flow for reaction with the specimen. The sensor is measured using appropriate reflection spectroscopy instrumentation.