Description Usage Arguments Details Value Methods Author(s) See Also Examples
This method retrieves a specific slice from a MincSliceIO object, and uses it to instantiate a MincSlice object.
1 2 | ## S4 method for signature 'MincSliceIO'
mincIO.getSliceFromSliceArray(mincSliceMatrix, sliceIndex)
|
mincSliceMatrix |
The name of a MincSliceIO object, most likely created via a call to |
sliceIndex |
The column number within the MincSliceIO object data matrix used to create the Slice object. If
the MincSliceIO object was initialized from a single 4D volume, then each column will represent
a specific slice across all frames of the dynamic volume. Thus, in this case, the |
MincSliceIO objects contain their data within a M x N matrix, in which each of the N columns store data from a specific slice, obtained from either (1) all frames of a single 4D volume, or (2) a collection of 3D volumes. This method can be used to convert one of these matrix columns into a MincSlice object for visualization or manipulation.
A MincSlice object.
Only one method/signature.
Jim Nikelski nikelski@bic.mni.mcgill.ca
mincIO.readBySlice
MincSlice
MincSliceIO
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
\dontshow{
# clear debug flag and get full volume pathname
# ... dunno why zzz.R debug setting is not passed
R_DEBUG_rmincIO <- 0
volDir <- system.file("packageData/volumes", package="rmincIO")
}
# read a slice from a dynamic volume
v4d <- file.path(volDir, "functional_4D.mnc")
s080_SA <- mincIO.readBySlice(v4d, 80) # read slice 80 across all frames
s080f006 <- mincIO.getSliceFromSliceArray(s080_SA,6) # get the slice from the 6th frame
print(s080f006)
plot(s080f006)
# read a slice from a series of 3D volumes
v305 <- file.path(volDir, "average305_PET_t1_tal_lin.mnc")
s020_SA <- mincIO.readBySlice(c(v305, v305), 20) # read slice 20 for all volumes
s020v002 <- mincIO.getSliceFromSliceArray(s020_SA,2) # get the slice for the 2nd volume
print(s020v002)
plot(s020v002)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.