I think there may actually be two separate questions embedded in one statement:
transform it into my subject space … intensity values has been changed
mask (tumor mask) … how i can get three different ROI based on tumor mask?
@maxpietsch’s response addresses specifically point 1: If you have an image that contains unique integer labels, you need to use nearest-neighbour interpolation at the re-gridding step in order to preserve those values.
For point 2, it sounds like you have a single input parcellation image, containing more than one unique integer label, and you instead wish to have multiple mask images, where each image contains only those voxels corresponding to one specific parcel index. If this is the case, this is a separate step to the rest of the question, so got lost in communication. What you want in this case is the
-eq operator in
mrcalc. E.g. If you want a mask image that contains only those voxels where the value in the parcellation image is 3:
mrcalc tumour_parcels.mif 3 -eq tumour_index_3.mif