[Insight-users] masking part of an image

Bill Lorensen bill.lorensen at gmail.com
Sun Apr 19 14:57:47 EDT 2009


Do a reader1->Update() and reader2->Update() before accessing the
outputs of the reader.

2009/4/19 shoosh moosh <babygirl_25 at hotmail.com>:
> Hi,
> I wrote up a program that takes as input 2 images - a 3D image, and a 3D
> binary mask image with 0's in the parts im not interested and 1's in the
> parts I want to segment out. I want the program to simply multiply each
> pixel in the original image with the corresponding pixel in the masking
> image and produce a third image of the same size having only the region
> specified by 1's in the mask. The code compiles, but when I run it, I get
> this error:
>
> terminate called after throwing an instance of 'itk::ExceptionObject'
>   what():
> /home/shoosh/InsightToolkit-3.10.2/Code/IO/itkNrrdImageIO.cxx:951:
> itk::ERROR: NrrdImageIO(0x8585a50): Write: Error wrapping nrrd for
> output.nhdr:
> [nrrd] nrrdWrap_nva:
> [nrrd] _nrrdSizeCheck: axis 0 size is zero!
>
> Can some one tell me how to fix it. the code is attached.
>
>
>
> ________________________________
> Get news, entertainment and everything you care about at Live.com. Check it
> out!
> _____________________________________
> 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