<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-forward-container">Hello,
<br>
<br>
I have a 4D image, which is a DSC Perfusion weighted MRI. Supose
the image has the dimenisions 270x270x171x34. I want to convert
this image into a Matrix of size Nx34, where N are the number of
voxels inside the intracraneal mask. The Matrix class comes from
Eigen library. In a classic "for loop" scheme the code would be
<br>
<br>
for (int x = 0; x < image.width(); x++)
<br>
{
<br>
for (int y = 0; y < image.height(); y++)
<br>
{
<br>
for (int z = 0; z < image.depth(); z++)
<br>
{
<br>
if (!mask(x, y, z))
<br>
continue;
<br>
<br>
for (int c = 0; c < image.spectrum(); c++)
<br>
Matrix(i, c) = image(x, y, z, c);
<br>
i++;
<br>
}
<br>
}
<br>
}
<br>
<br>
<br>
How can I do this in ITK?? I have read several ImageRegionIterator
examples, but I do not find a clean and correct way to do what I
want.<br>
<br>
Thank you very much.
<br>
Regards.
<br>
<br>
Javier.
</div>
</body>
</html>