<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Hi!<div>&nbsp; &nbsp;I stil have a problem when using the "iitkJoinImageFilter".</div><div>&nbsp; Here is the thing:</div><div>&nbsp;&nbsp;&nbsp;typedef itk::Image&lt; double, 2 &gt; &nbsp; ImageType2D; &nbsp;// defying the Readertype,they are 2D slices</div><div>&nbsp; &nbsp;typedef itk::Image&lt; double,3 &gt; &nbsp; &nbsp;ImageType3D; // the 3D volume which I want to get from the JoinImageFilter</div><div><br></div><div>&nbsp; As I read a series of 2D slices with a "for" loop,then after processing them , I use JoinImageFilter to get a 3D output, then I had a problem:</div><div><br></div><div>&nbsp;typedef itk::JoinImageFilter&lt;ImageType2D, ImageType3D&gt; JoinImageFilterType;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;JoinImageFilterType::Pointer joinFilter = JoinImageFilterType::New();</div><div><br></div><div>&nbsp; for(int slice=0;slice&lt;10,slice++)</div><div>{</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.........read the 2D slice...........</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;..........processing............</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ...........2D output Image......</div><div>&nbsp; &nbsp; joinFilter-&gt;SetInput(slice,outputImage);</div><div>}</div><div>&nbsp;joinFilter-&gt;update;</div><div><br></div><div>But after I did this ,vs comes out an error says itk can't convert from 2D to 3D, &nbsp;If it's convienient can you show me an example like this with the&nbsp;<span style="line-height: 1.7;">"iitkJoinImageFilter"? To show me how to make this right? Thank you! Also,if I want to test whether I get a proper 3D volume,what shall I do then?&nbsp;</span></div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br>At 2013-09-25 14:23:27,shiwei&nbsp;&lt;swingsw89@163.com&gt; wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Thank you very much! Brad!<div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;shiwei<br><br><br><br><br><div></div><div></div><br>At 2013-09-25 00:00:50,"Bradley&nbsp;Lowekamp"&nbsp;&lt;<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>&gt; wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div>Hello,</div><div><br></div><div>To join a series of 2D image into a 3D volume you can you the JoinImageFilter:</div><div><a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1JoinImageFilter.html">http://www.itk.org/Insight/Doxygen/html/classitk_1_1JoinImageFilter.html</a></div><div><br></div><div>The extract a 2D image from a 3D volume you can use the ExtractImageFilter:</div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html</a></div><div><br></div><div>To extract a 3D volume from a 3D volume there are a few filter:</div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1ExtractImageFilter.html</a></div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html</a></div><div><a href="http://www.itk.org/Doxygen/html/classitk_1_1CropImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1CropImageFilter.html</a></div><div><br></div><div>Hope that helps,</div><div>Brad</div><br><div><div>On Sep 24, 2013, at 11:14 AM, shiwei &lt;<a href="mailto:swingsw89@163.com">swingsw89@163.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.7; font-size: 14px; font-family: arial; ">Hi,all~<div><span class="Apple-tab-span" style="white-space:pre">        </span>As I first read a 3D Image Volume slice by slice,then after processing each slice I need to change them to a 3D volume for further processing, However,<b> I can't use&nbsp;itk::ImageSeriesReader</b> for my pixeltype now is double and it takes to much time to write out the 2D image first.</div><div>&nbsp; &nbsp; &nbsp; &nbsp;I wonder if there is a class to help me read the 2D slices directly to 3D volume just in the memory.Also, I still eager to know whether there is a class can direclty extract a part of 3D volume from a bigger one.Beacuse IF there is no way to deal with that ,I will have to change all the 2D images to 2D Array then combine them to 3D Array which I think may take a lot of time.</div><div>&nbsp; &nbsp; &nbsp; &nbsp;Do you have any way to figure this out? Thank you all !</div></div><br><br><span title="neteasefoote
 r"><span id="netease_mail_footer"></span></span>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<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></blockquote></div><br></blockquote></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span></blockquote></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>