[vtkusers] vtkImageWeightedSum and registering data

David Gobbi david.gobbi at gmail.com
Fri Apr 9 17:15:05 EDT 2010


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