[vtkusers] vtkImageWeightedSum and registering data
Scott Johnson
Scott.Johnson at neuwave.com
Sun Apr 11 23:10:25 EDT 2010
Thanks for the pointer David.
How can I get a vtkImageData to pass into SetInformationInput from a vtkDICOMImageReader? GetImageDataInput doesn't work because there is no input to the reader. The vtkDICOMImageReader is establishing the coordinate system to which I need to register.
Thanks
-- Scott
-----Original Message-----
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Friday, April 09, 2010 4:15 PM
To: Scott Johnson
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkImageWeightedSum and registering data
Hi Scott,
There is an option in vtkImageReslice to match the voxel locations
between two images, so that the corresponding voxel indices indicate
the same physical locations.
If image "A" is the fixed image and image "B" is the moving image, then do this:
reslice->SetInput(B);
reslice->SetInformationInput(A);
reslice->SetTransform(T);
C = reslice->GetOutput();
Now "A" and "C" can be summed, blended, subtracted, etc.
David
On Fri, Apr 9, 2010 at 2:58 PM, Scott Johnson <Scott.Johnson at neuwave.com> wrote:
> Hello,
>
>
>
> I'm using vtk 5.4.2 on a windows platform.
>
>
>
> I've got a number of DICOM series which are being read by
> vtkDICOMImageReaders. Now I need to register them and average the pixel
> values. For now I'm just adding translations to the origins and connecting
> them to a vtkImageWeightedSum object. The issue is that my translations
> don't seem to have an effect.
>
>
>
> I've tried connecting the vtkDICOMImageReader -> vtkImageChangeInformation
> -> vtkImageWeightedSum and
> vtkDICOMImageReader->vtkImageReslice->vtkImageWeightedSum. Neither of which
> worked.
>
>
>
> Looking at the source code for vtkImageWeightedSum, I guess it makes sense
> because it is doing a voxel by voxel summing and not taking the spatial
> location of the pixels into account.
>
>
>
> Is there a way to do this in vtk or do I need to incorporate some itk?
>
>
>
> Thanks
>
>
>
> -- Scott
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list