[Insight-users] All zero output with ResampleImageFilter (ITK 3.4)

Víctor Rodrigo Córdoba vrcordoba at gmail.com
Wed Dec 3 06:23:13 EST 2008


Hi.

1) I use this piece of code:

    ImageType::SizeType
size1=filResample->GetOutput()->GetLargestPossibleRegion().GetSize();
    ImageType::IndexType index;
    index[0] = 0;index[1] = 0;index[2] = 0;
    int pixelsOn=0;
    for(index[2]=0;index[2]<size1[2];index[2]++) {
        for(index[1]=0;index[1]<size1[1];index[1]++) {
            for(index[0]=0;index[0]<size1[0];index[0]++) {
                if(filResample->GetOutput()->GetPixel(index)) {
                    pixelsOn++;
                }
            }
        }
    }

  After executing this, pixelsOn is zero.
  Does it exist any program to check pixel values?

 2) I set Similarity Transform to be an identity, commenting:

    //transform->SetScale(scale);
    //transform->SetTranslation(translation);

 but nothing changes.

Thank you for responding.

2008/12/2 Luis Ibanez <luis.ibanez at kitware.com>

>
>
> Hi Victor,
>
>
> 1) How did you arrive to the conclusion
>   that all the output values are zeros ?
>
>   because you see a black image in a visualization tool ?
>   or because you actually used a program to check the
>   pixel values ?
>
> 2) If you set the Similarty Transform to be an Identity,
>   do you see an proper image in the output ?
>
>
> Please let us know,
>
>
>
>   Thanks
>
>
>       Luis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081203/7c3c2bf9/attachment.htm>


More information about the Insight-users mailing list