[Insight-developers] Image as an OrientedImage Progress

Bill Lorensen bill.lorensen at gmail.com
Tue Sep 16 11:58:50 EDT 2008


As I said, although the issue has been known for some time, now is the
time to attack it. We need some thought time on this one.

For now, we'll just let the tests keep failing. One platform in the
nightly is enough to keep us reminded.

Bill

On Tue, Sep 16, 2008 at 11:49 AM, kent williams
<norman-k-williams at uiowa.edu> wrote:
> There is a similar problem in the Analyze ImageIO, and it's rather baffling
> that it doesn't show up in e.g. The NIfTI ImageIO.
>
> I'm not sure about how to fix this, but the thing about 2D images is that
> they always have an implied third dimension, which is perpendicular to the
> acquisition plane.  The ideal situation would be this: if ITK reads a 2D
> image, it should embed it correctly in a 3D volume. As you point out, that's
> how DICOM works.
>
> I can think of only a couple ways to fix this; one easy and probably wrong
> in ways that won't matter a large percentage of the time, and one hard and
> correct.
>
> Easy: Stop throwing the exception, and silently allow degenerate dir cosines
> in 2D.
> Hard: Make 3 the minimum size for a direction cosine.
>
> The 'hard' solution means these things:
>
> 1. Verify that every ImageIO class fills out 3 vectors even in 2D
> 2. Look for and verify that every class in the library, every example
> program, and every InsightApplications program, that diddles dir cosines
> directly does something reasonable in the 2D case.
>
> As far as programs by Insight Users go, just going to OrientedImage as the
> default will break a few of them.
>
> On 9/16/08 9:57 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>
>> Here is the problem with the remaining failing tests. This issue has
>> been raised before.
>> See http://public.kitware.com/Bug/view.php?id=5573
>>
>> There are really two "dimensions" of an image.
>>
>> 1) ImageDimension is the number of dimensions in the image container,
>> 1, 2, 3, ...
>> 2) I'll call it SpatialDimension, the number of dimensions in the
>> coordinate system of the image. This dimension is the dimension used
>> for origin, spacing and the direction.
>>
>> For example, in general, DICOM images have an image dimension of 2,
>> yet the image position patient and directions are of dimension 3.
>> Analyze images have the same issue. And I'm sure nrrd's also.
>>
>> In the failing tests, single dicom images are selected and the direction
>> 1 0 0
>> 0 0 -1
>> 0 -1 0
>>
>> The current logic in ImageFileReader, simply truncates the direction to:
>> 1 0
>> 0 0
>> which is singular.
>>
>> So... we need some further thought about this problem.
>>
>
>
>
> 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