From: Rob Comer on 21 Jun 2010 11:12 "Yngve Munck-Lindblom" <yngvechr(a)fys.ku.dk> wrote in message <hvkqa1$n96$1(a)fred.mathworks.com>... > I have a 3D magnetic resonance image (192x256x256 voxels) made up of voxels for which I know the coordinates of each voxel in some reference coordinate system (RCS). Further I have a smaller 3D image (10x10x30 voxels) for which I know the voxel coordinates in the same RCS. The two images may have an arbitrary orientation with respect to each other and are both rotated with respect to the RCS axes. > > What I want to do is to reslice the large image along the directions of the small image, i.e. find what the large image looks like within the smaller image and with respect to the coordinate system of the small image. It sounds like you are doing a 3-D geometric transformation and that you need to resample the voxels of the large image to assign values to the small one. If you have Image Processing Toolbox you can do this with the TFORMARRAY function. TFORMARRAY is related to IMTRANSFORM, but it is much more general. It is not limited to 2-D transformations and is intended specifically for problems like this. The main requirement is that you construct a transformation that maps the voxel locations in the small, output image into the voxel space of the large, input image. (There's actually no need to be able to transform in the other direction, from the input to the output.) You can control the resampling, and can easily specify a nearest neighbor, linear, or cubic approach using the MAKERESAMPLER function. Rob Comer Mapping and Image Processing Team MathWorks
First
|
Prev
|
Pages: 1 2 Prev: how to call values from main code in fsolve Next: How to fix camera position? |