But this is actually good to look at because this will actually change
the way things are plotted.
So when we go back and we look at the brain here.
So the brightness of the voxels are mapped to the grey scale pallet.
And that's mapped in a certain way so that if things are really, really bright,
if you have a super bright voxal in your image.
So if you have a super bright area, then this entire image,
the majority of it will actually look a lot dimmer.
So sometimes it's very good to maybe lop of some of the top voxels and
set them to some value.
So for example, if we set everything above 1,000 to 1,000, that can actually
make the picture look brighter, but get the same level of information.
Maybe not in the high intensity areas, but maybe some of those aren't so of interest.
We call the back mapping, so what we do is we derive some sort of statistic or
we derive some sort of information from the image.
And then we may want to plot something overlaid on the image,
that might no actually be that clear.
So what we do here is we create a vector, a logical operator.
We say, is this object, is the nifty object for
all the voxels greater than 300 and less than 400.
So we just want to say, give me a logical yes, true or false,
whether a specific voxel is between 301 and 499 inclusive.
And I say that because they're pretty much mapped to integers.
So it's not like there's 300.5, at least the way the data is originally acquired.
So we take 301 to 399 and we say these voxels, give me those.
Give me true for that, everything else is false.
So that is what this is_btw_300_400.
So we said, give me something that says true if you're between these values,
false if you're not.
Then we copy the NIfTI nii_T1 object, it's a NIfTI object in R.
So we just copy that over and we call that nii_T1_mask.
And then we do one operation, we say nii_T1_mask and we subset, and
we say, not the vector we just made or the logical operators.
And then we assign those NA.
So what is this entire operation doing?
So we're saying, we want an image where if values are outside,
so our 300 and lower, or 400 or higher.
We want to actually set those to be NAs.
We want to throw them out and call them not applicable.