[Insight-developers] Should Filters propogate
theDirection Cosines from Image input to image output?
Miller, James V (Research)
millerjv at crd.ge.com
Wed Nov 2 13:07:12 EST 2005
I think that line is coping the direction vectors from the reference
image not the input image. Specifying a reference image is optional.
If specied, then the output gets the spacing, origin, and directions
from that image instead of having to specify them individually via
method calls.
Jim
-----Original Message-----
From: insight-developers-bounces+millerjv=crd.ge.com at itk.org
[mailto:insight-developers-bounces+millerjv=crd.ge.com at itk.org]On Behalf
Of Luis Ibanez
Sent: Tuesday, November 01, 2005 1:05 PM
To: Lorensen, William E (Research)
Cc: Insight-developers (E-mail); Kent Williams
Subject: Re: [Insight-developers] Should Filters propogate theDirection
Cosines from Image input to image output?
Isn't that what lines 299 and 305 do in
Insight/Code/BasicFilters/itkResampleImageFilter.txx:
299: outputPtr->SetDirection( m_ReferenceImage->GetDirection() );
Jim: The direction cosines should be passed as they are, not being
affected by the transform itself, since, if we transform the pixels
*and* the direction cosines we will end up applying a null transform
or a double transform.
Luis
----------------------------------------
Lorensen, William E (Research) wrote:
> Yes they should. I'm surprised ResampleImageFilter does not propagate them. I thought I did that already.
>
> Bill
>
> -----Original Message-----
> From: insight-developers-bounces+lorensen=crd.ge.com at itk.org
> [mailto:insight-developers-bounces+lorensen=crd.ge.com at itk.org]On Behalf
> Of Kent Williams
> Sent: Monday, October 31, 2005 2:34 PM
> To: Insight-developers (E-mail)
> Subject: [Insight-developers] Should Filters propogate the Direction
> Cosines from Image input to image output?
>
>
> I discovered this when using ResampleImageFilter to shrink some image
> volumes -- the ResampleImageFilter doesn't propogate the Direction
> Cosines from the input image into the output image. Consequently if you
> write out the resulting image it may not be oriented consistent with the
> input image.
>
> Should filters set the Direction Cosines on the output? I know that
> itk::OrientImageFilter does so, which is natural since it is changing
> the orientation. But what about filters like ResampleImageFilter, which
> does not change the image orientation? What about the cases where an
> output image is produced from more than one input image?
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list