[Insight-users] Wierd metric value for subregion of image

motes motes mort.motes at gmail.com
Wed Sep 23 04:11:30 EDT 2009


Thanks :-)

On Wed, Sep 23, 2009 at 1:38 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Your upper indices should be 255, not 256.
>
> On Tue, Sep 22, 2009 at 6:19 PM, motes motes <mort.motes at gmail.com> wrote:
>> I am trying to compute the metric value for 4 subregions in a 512*512
>> image pair (fixed, moving). All regions have the size (256, 256) which
>> gives the following 4 regions:
>>
>>
>> Region 0 (lower left corner):
>> start index = (0,0)
>>
>> Region 1 (lower right corner):
>> start index = (256,0)
>>
>> Region 2 (Upper left corner):
>> start index = (0, 256)
>>
>> Region 3 (Upper right corner):
>> start index = (256, 256)
>>
>>
>> The moving image is deformed increasingly for each region in the
>> following order: D(R0) < D(R1) < D(R2) < D(R3) using a 8*8
>> BSplineDeformableTransform:
>>
>>    0  0    0  0    0  0    0  0              0  0    0  0    0  0    0  0
>>
>>    0  0    20 20    20 20    0  0         0  0    40 40    40 40    0  0
>>
>>    0  0    20 20    20 20    0  0         0  0    40 40    40 40    0  0
>>
>>    0  0    0  0    0  0    0  0             0  0    0  0    0  0    0  0
>>
>>
>>
>>    0  0    0  0    0  0    0  0             0  0    0  0    0  0    0  0
>>
>>    0  0    0  0    0  0    0  0             0  0    10 10    10 10    0  0
>>
>>    0  0    0  0    0  0    0  0             0  0    10 10    10 10    0  0
>>
>>    0  0    0  0    0  0    0  0             0  0    0  0    0  0    0  0
>>
>>
>> But when I compute the metric I get som rather unexpected values:
>>
>>
>> subRegion = ImageRegion (0148EF70)
>>  Dimension: 2
>>  Index: [0, 0]
>>  Size: [256, 256]
>> value = 6490.59
>>
>>
>> subRegion = ImageRegion (0148EF70)
>>  Dimension: 2
>>  Index: [0, 256]
>>  Size: [256, 256]
>> value = 704.728
>>
>>
>> subRegion = ImageRegion (0148EF70)
>>  Dimension: 2
>>  Index: [256, 0]
>>  Size: [256, 256]
>> value = 9512.77
>>
>>
>> subRegion = ImageRegion (0148EF70)
>>  Dimension: 2
>>  Index: [256, 256]
>>  Size: [256, 256]
>> value = 2481.78
>>
>>
>> I would expect that the region starting in index (0,0) should almost
>> be 0. This is also verified from the following images (fixed, moving
>> and difference respectivily):
>>
>> http://img6.imageshack.us/img6/994/82602924.jpg
>>
>> Am I defining the start index in the fixed image wrong?
>> _____________________________________
>> 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 ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>


More information about the Insight-users mailing list