<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
This is what I got when I printed them:<br><br>Image (0x857c040)<br> RTTI typeinfo: itk::Image<short, 3u><br> Reference Count: 2<br> Modified Time: 205<br> Debug: Off<br> Observers: <br> none<br> Source: (0x8579948) <br> Source output index: 0<br> Release Data: Off<br> Data Released: False<br> Global Release Data: Off<br> PipelineMTime: 27<br> UpdateMTime: 206<br> LargestPossibleRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> BufferedRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> RequestedRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> Spacing: [1, 1, 1]<br> Origin: [0, 0, 0]<br> Direction: <br>1 0 0<br>0 1 0<br>0 0 1<br><br> IndexToPointMatrix: <br> 1 0 0<br>0 1 0<br>0 0 1<br><br> PointToIndexMatrix: <br> 1 0 0<br>0 1 0<br>0 0 1<br><br> PixelContainer: <br> ImportImageContainer (0x857c1f8)<br> RTTI typeinfo: itk::ImportImageContainer<unsigned long, short><br> Reference Count: 1<br> Modified Time: 203<br> Debug: Off<br> Observers: <br> none<br> Pointer: 0x9fb12008<br> Container manages memory: true<br> Size: 202176000<br> Capacity: 202176000<br>Image (0x857e938)<br> RTTI typeinfo: itk::Image<unsigned char, 3u><br> Reference Count: 2<br> Modified Time: 357<br> Debug: Off<br> Observers: <br> none<br> Source: (0x857c240) <br> Source output index: 0<br> Release Data: Off<br> Data Released: False<br> Global Release Data: Off<br> PipelineMTime: 28<br> UpdateMTime: 358<br> LargestPossibleRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> BufferedRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> RequestedRegion: <br> Dimension: 3<br> Index: [0, 0, 0]<br> Size: [540, 520, 720]<br> Spacing: [1, 1, 1]<br> Origin: [0, 0, 0]<br> Direction: <br>1 0 0<br>0 1 0<br>0 0 1<br><br> IndexToPointMatrix: <br> 1 0 0<br>0 1 0<br>0 0 1<br><br> PointToIndexMatrix: <br> 1 0 0<br>0 1 0<br>0 0 1<br><br> PixelContainer: <br> ImportImageContainer (0x857eaf0)<br> RTTI typeinfo: itk::ImportImageContainer<unsigned long, unsigned char><br> Reference Count: 1<br> Modified Time: 355<br> Debug: Off<br> Observers: <br> none<br> Pointer: 0x93a42008<br> Container manages memory: true<br> Size: 202176000<br> Capacity: 202176000<br><br>I think they are the same size, right? However one is a an image of short's while the other is of unsigned char's.<br><br><br><br><br>> Date: Sun, 19 Apr 2009 15:35:53 -0400<br>> Subject: Re: [Insight-users] masking part of an image<br>> From: bill.lorensen@gmail.com<br>> To: babygirl_25@hotmail.com<br>> CC: insight-users@itk.org<br>> <br>> Are the input and input mask the same size? Try printing them.<br>> inputImage->Print(std::cout);<br>> inputMaskImage->Print(std::cout);<br>> <br>> after the Update's<br>> <br>> 2009/4/19 shoosh moosh <babygirl_25@hotmail.com>:<br>> > Ok, I added the reader->Update(), but now I'm getting a different error:<br>> > Segmentation fault<br>> ><br>> > The program apparently crashes in the for loop.<br>> ><br>> > I think something might be wrong with lines 64-65, but I'm not sure what.<br>> > inputImage=reader1->GetOutput();<br>> > inputMaskImage=reader2->GetOutput();<br>> ><br>> > I attached the code again.<br>> > Thanks<br>> ><br>> ><br>> ><br>> >> Date: Sun, 19 Apr 2009 14:57:47 -0400<br>> >> Subject: Re: [Insight-users] masking part of an image<br>> >> From: bill.lorensen@gmail.com<br>> >> To: babygirl_25@hotmail.com<br>> >> CC: insight-users@itk.org<br>> >><br>> >> Do a reader1->Update() and reader2->Update() before accessing the<br>> >> outputs of the reader.<br>> >><br>> >> 2009/4/19 shoosh moosh <babygirl_25@hotmail.com>:<br>> >> > Hi,<br>> >> > I wrote up a program that takes as input 2 images - a 3D image, and a 3D<br>> >> > binary mask image with 0's in the parts im not interested and 1's in the<br>> >> > parts I want to segment out. I want the program to simply multiply each<br>> >> > pixel in the original image with the corresponding pixel in the masking<br>> >> > image and produce a third image of the same size having only the region<br>> >> > specified by 1's in the mask. The code compiles, but when I run it, I<br>> >> > get<br>> >> > this error:<br>> >> ><br>> >> > terminate called after throwing an instance of 'itk::ExceptionObject'<br>> >> > what():<br>> >> > /home/shoosh/InsightToolkit-3.10.2/Code/IO/itkNrrdImageIO.cxx:951:<br>> >> > itk::ERROR: NrrdImageIO(0x8585a50): Write: Error wrapping nrrd for<br>> >> > output.nhdr:<br>> >> > [nrrd] nrrdWrap_nva:<br>> >> > [nrrd] _nrrdSizeCheck: axis 0 size is zero!<br>> >> ><br>> >> > Can some one tell me how to fix it. the code is attached.<br>> >> ><br>> >> ><br>> >> ><br>> >> > ________________________________<br>> >> > Get news, entertainment and everything you care about at Live.com. Check<br>> >> > it<br>> >> > out!<br>> >> > _____________________________________<br>> >> > Powered by www.kitware.com<br>> >> ><br>> >> > Visit other Kitware open-source projects at<br>> >> > http://www.kitware.com/opensource/opensource.html<br>> >> ><br>> >> > Please keep messages on-topic and check the ITK FAQ at:<br>> >> > http://www.itk.org/Wiki/ITK_FAQ<br>> >> ><br>> >> > Follow this link to subscribe/unsubscribe:<br>> >> > http://www.itk.org/mailman/listinfo/insight-users<br>> >> ><br>> >> ><br>> ><br>> > ________________________________<br>> > See all the ways you can stay connected to friends and family<br><br /><hr />What can you do with the new Windows Live? <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>Find out</a></body>
</html>