[Insight-users] subtract every voxel in displacement field
Emma Saunders
emmasaunders123 at gmail.com
Mon May 6 18:59:07 EDT 2013
Hi everyone,
I would like to produce a vector field with each input is the negative of
itself:
Is there an easy way to do this in ITK.
I am unsure if order is presereved if I do the following
typedef itk::ImageRegionIteratorWithIndex< FieldType > IteratorType;
IteratorType it ( SubField, region );
for ( it.GoToBegin(); !it.IsAtEnd(); ++it)
{
FieldType::IndexType idx = it.GetIndex();
idx[0] = index[0] + size[0] - 1 - idx[0];
it.Set(-DispField->GetPixel(idx));
//std::cout <<idx <<std::endl;
}
as e.g SubField[0 29 0] doesn't equal -DispField[0 29 0]
Any suggestions appreciated
Thanks emma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130506/7462d7bc/attachment.htm>
More information about the Insight-users
mailing list