The K-22 Masterpiece became the Model 17 Masterpiece when Smith began using the model number system in the late
1950's. The Model 18 that you mention in your post title is the Model 18 Combat Masterpiece - essentially a .22 version of the Model 15. Hope that helps.
To add to what Desert Rat said, the M17 will typically have a six inch barrel with Patridge front sight, and the M18 will typically have a four inch barrel with Baughmann Quick Draw front sight. Both are mighty fine handguns.
Ordy-for the most part the Model 17's have 6" or 8 3/8" barrels and the Model 18 has a 4". Later in the production run (I believe starting in the -5 version) the Model 18 was discontinued, so there were model marked 17's with 4" barrels. Generally the 6" and 8 3/8" guns have patridge front sights and the 18's have ramps. The new Model 18's have patridge sights and except for the lock abomination are good looking guns IMHO.
I took a young lady I work with to the range for the first time and we shot a M19-4 w/6" barrel. It was loaded w/.38 cal ammo and then we moved to a commander sized semi in 9mm. When she stepped to the line, I could see she was a bit intimidated by the size and recoil but they were the smallest pistols I had to offer. I've had a few other ladies ask about a range trip and I'm more than happy to oblige but I don't want a repeat of the the first young lady's experience. I was thinking the M18 might fit the bill better due to the shorter barrel and smaller grips (I have target grips on the 19). I want their introduction to the shooting sports to be positive.
The Mod 18 works fine for ladies, as well as the Mod 64 or 63 which are J Frame .22's which are even smaller. The Mod 18 is heavier and more easily controlled, and in my opinion one of the best training handguns available.