Image quality has many aspects to be considered: - resolution (pixels per mm) - high ISO noise handling - dynamic range - Some folks might even toss in the auto-focus system. Since you cannot separate the sensor from the body, features and programs do play a part, if even just a small one.
It is usually a compromise: as one goes up, another goes down. For resolution only, the D7100 might be best (check the math). Trading a little resolution for DR, the D800 might be best. The D4 is king of the high-ISO while sacrificing much resolution to get it.
What your subjects are and under what circumstances you shoot them both play a part in how you judge all of this.
---------+---------+---------+---------+---------+ Joseph K Seattle, WA, USA