[Insight-developers] DiffusionTensor3DReconstructionWithMaskImageFilter enhancement question.
Williams, Norman K
norman-k-williams at uiowa.edu
Thu Jan 27 09:58:25 EST 2011
I am in the process of adding a mask input to itk:DiffusionTensor3DReconstructionWithMaskImageFilter.
Currently, there is a threshold parameter, so that it ignores voxels in the reference image with values below the threshold. What I'm adding is some code at the same point to look up the corresponding voxel in a mask image.
The problem is that at that point in the filter, it's stepping through the image with an ImageRegionConstIterator. I could use an ImageRegionConstIterator to step through the mask at the same time, but the filter can't no for a fact that the mask and the reference image are congruent in space. So I'm doing this:
ItIndexType index(it.GetIndex()); // get index from reference image iterator
MaskImageType::PointType pt;
refImage->TransformIndexToPhysicalPoint(index,pt); // find physical point for index
MaskImageType::IndexType maskIndex; // find index in mask from physical point
this->m_MaskImage->TransformPhysicalPointToIndex(pt,maskIndex);
MaskImageType::PixelType pix =
this->m_MaskImage->GetPixel(maskIndex);
This seems to be the right thing to do, but it has to add considerable overhead compared to a ImageRegionConstIterator. Is there a better way to do this?
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the Insight-developers
mailing list