Hi Catrin,
Sorry I didn't see your post earlier . . .
Just wanted to add on to what Oakleaf said above --
Yes, avoid the big gym classes.
If you're going to do Pilates at all while recovering from this injury, it would be well worth your time and money to do some one-on-one instruction, at least initially, with a studio-based instructor who is comprehensively trained. There is something of a common-sense approach to working around an injury, either by modifying exercises or leaving them out, until that part of your body is well enough to start working again. If you are working with an injury you can't get the kind of attention you need if you are in a class.
In other words, if you have a good instructor, you don't have to stay away from Pilates altogether while your hamstring is healing. There are many things that you can still do to maintain/build core strength. I had to do a lot of modifications when my lower back/hip were healing, and in my case, exercising with those modifications were better than being sedentary and letting things stiffen up.
2014 Bobbin Bramble / Brooks B67
2008 Rodriguez Rainier Mirage / Terry Butterfly Tri Gel
2007 Dahon Speed Pro TT / Biologic Velvet