There are so many Star Trek sites with different lengths for one and the same spaceship, so I did something simple: I have estimated the lengths of the ships but not based on screenshots. I have calculated it.
That's the premise: a deck is 2.5 m + 0.5 m for EPS cables, power cables, ... = 3m height for a deck.
Starfleet ships from the 24th century have 4m (3m deck high + 1m Jefferies tube) because from the 24th century the Jefferies tubes are located between the decks. Before, they were installed "behind the walls", like side corridors.
Most ships have windows, so you can calculate the height of a deck. If the amount so specifies with 3m -> gives the length in meters. For all the views I have 300 Pixels/cm used because the 100% corresponds to the length (1 pixel = 1 m).
PS: A special thank (and all copyright) for the picture material to: John Eaves, Drex Files, Star Trek Fact Files and Star Trek The Magazine, Starship Collection Magazine and The Light Works.