I don't know of what size is your mesh, but 20x20x20 seems too small. Try 1024x1024x1024, with origin -512,-512,-512. Also, do you expect to get a series of TIFF images or only 1 image? That might be problematic too - try writing it into "cone_01.mha".<div>
<br></div><div>Regards,</div><div>Dženan<br><br><div class="gmail_quote">2010/7/1 <span dir="ltr"><<a href="mailto:lynx.abraxas@freenet.de">lynx.abraxas@freenet.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 30/06/10 14:18:20, Dženan Zukić wrote:<br>
> Hi Lynx,<br>
><br>
> that index mentioned in the error message is filter's internal variable. You<br>
> cannot set it directly. The most likely cause for that is miscalculation of<br>
> your image parameters (origin, size) with regards to mesh's volume. Try<br>
> playing with parameters you give to your program to see if it makes a<br>
> difference - try smaller mesh, try smaller image, larger image etc.<br>
<br>
Thanks Dženan for Your reply. I tried with different parameters like smaller<br>
mesh, smaller image, larger image but nothing helped.<br>
<br>
With a new version of my code (attached) where I allocate the output image<br>
frist the problem remains.<br>
I figured out though that it has to be a vtk-file not a vtp-file. If I use a<br>
vtp-file I get the error (more below):<br>
terminate called after throwing an instance of 'std::out_of_range'<br>
<br>
<br>
How would I have to ajust my code if I just want to specify the dimension in<br>
x,y,z and let the program set origin and extend and spacing such that the<br>
whole mesh is just fitting into the output?<br>
<br>
Many thanks for any help or hints.<br>
Lynx<br>
<br>
<br>
__________________________________________________________<br>
<br>
~/itk/simple/voxelizer_itk_02 cone_01.vtp cone_01.tif 20 20 20 -10 -10 -10<br>
Reading: cone_01.vtp<br>
terminate called after throwing an instance of 'std::out_of_range'<br>
what(): basic_string::basic_string<br>
Abgebrochen<br>
<br>
<br>
gdb ~/itk/simple/voxelizer_itk_02<br>
GNU gdb 6.6.50.20070726-cvs<br>
Copyright (C) 2007 Free Software Foundation, Inc.<br>
GDB is free software, covered by the GNU General Public License, and you are<br>
welcome to change it and/or distribute copies of it under certain conditions.<br>
Type "show copying" to see the conditions.<br>
There is absolutely no warranty for GDB. Type "show warranty" for details.<br>
This GDB was configured as "x86_64-suse-linux"...<br>
Using host libthread_db library "/lib64/libthread_db.so.1".<br>
(gdb) run cone_01.vtp cone_01.tif 20 20 20 10 10 10<br>
Starting program: /net/home/aaa/itk/simple/voxelizer_itk_02 cone_01.vtp cone_01.tif 20 20 20 10 10 10<br>
[Thread debugging using libthread_db enabled]<br>
[New Thread 0x2b7ccd2e6df0 (LWP 1330)]<br>
terminate called after throwing an instance of 'std::out_of_range'<br>
what(): basic_string::basic_string<br>
<br>
Program received signal SIGABRT, Aborted.<br>
[Switching to Thread 0x2b7ccd2e6df0 (LWP 1330)]<br>
0x00002b7cccb98b45 in raise () from /lib64/libc.so.6<br>
(gdb) bt<br>
#0 0x00002b7cccb98b45 in raise () from /lib64/libc.so.6<br>
#1 0x00002b7cccb9a0e0 in abort () from /lib64/libc.so.6<br>
#2 0x00002b7ccc716d34 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib64/libstdc++.so.6<br>
#3 0x00002b7ccc714ce6 in ?? () from /usr/lib64/libstdc++.so.6<br>
#4 0x00002b7ccc714d13 in std::terminate () from /usr/lib64/libstdc++.so.6<br>
#5 0x00002b7ccc714dfa in __cxa_throw () from /usr/lib64/libstdc++.so.6<br>
#6 0x00002b7ccc6b111a in std::__throw_out_of_range () from /usr/lib64/libstdc++.so.6<br>
#7 0x00002b7ccc6f2ebd in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib64/libstdc++.so.6<br>
#8 0x00000000004e1e60 in itk::VTKPolyDataReader<itk::Mesh<double, 3u, itk::DefaultStaticMeshTraits<double, 3u, 3u, float, float, double> > >::GenerateData ()<br>
#9 0x000000000069234b in itk::ProcessObject::UpdateOutputData ()<br>
#10 0x000000000069241d in itk::ProcessObject::UpdateOutputData ()<br>
#11 0x00000000004c02b5 in main ()<br>
<br>
</blockquote></div><br></div>