RATS - FAQ
What is a vtp file? How do I convert it to a binary brain mask?
VTP is a file format for storing VTK surface models (polydata). There are several tools for converting VTK surface models into binary images. We recommend 3D Slicer - in particular, the “Model to Label Map” module can be used to convert a surface model to a binary image, and the output can be saved in any ITK-readable format.
Detailed instructions: Once Slicer is installed and you start the application, you load the data by pressing ctrl+a. Load both the .vtp file and the grayscale image you used as input (e.g. the T1w image). When you press apply, you should be seeing the 3D surface and the grayscale image in your workspace. Next, in the Modules menu (where it says “Welcome to Slicer” at the top), go to All Modules > Model To Label Map. In the IO tab, choose the grayscale image as “Input Volume” and the vtp file as “Model”. Select “Create New Volume” as the Output Volume. In the Settings tab, choose the sample distance - this is basically how accurate the conversion will be. The smaller the sample distance, the more accurate it will be, but the slower the computation. We recommend setting this to slightly less than the resolution of your image - e.g., 0.1mm works well for the testData distributed with the RATS package (which has resolution 0.15mm). Then, click on Apply at the bottom. This will create the binary brain mask. To save the result, press ctrl+s, make sure the output volume has a check in its little check box, and choose file name/directory. Click save, and it's done.
I get an empty image as the result of the MM stage. What do I do?
This can happen if your input image is float - RATS is expecting an integer image. Conversion (by multiplying the image, e.g. by 10000) should do the trick.