<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.5">
<TITLE>RE: [Insight-users] reader is wrapped but not the writer?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
Since I am not working on a branch (just downloaded source code from ITK), I attached the file here.<BR>
Hope that after the holiday, you can submit the patch for me. Thank you!<BR>
<BR>
Wen<BR>
<BR>
Postdoctoral Fellow<BR>
Bioengineering, Sheikh Zayed Institute<BR>
Children's National Medical Center<BR>
111 Michigan Ave. NW<BR>
Washington DC, 20010<BR>
Email: wli@cnmc.org<BR>
Phone: 202-476-1268<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
Sent: Fri 12/21/2012 1:33 PM<BR>
To: Li, Wen<BR>
Cc: Bradley Lowekamp; insight-users@itk.org<BR>
Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
<BR>
Hello,<BR>
<BR>
That is great you were able to wrap the class.<BR>
<BR>
It would be even better to contribute that back to the community. The ideal way is to submit a patch to gerrit for review:<BR>
<BR>
<A HREF="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html</A><BR>
<BR>
Next would be to fork the github repository and push a patch to your fork.<BR>
<BR>
Lastly, even just e-mail the file would be appreciated. The point is to get you hard work out there so every one can benefit!<BR>
<BR>
Thanks,<BR>
Brad<BR>
<BR>
On Dec 21, 2012, at 1:23 PM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
<BR>
&gt; OK. by mimic wrapping of ExtractImageFilter:<BR>
&gt;<BR>
&gt; <A HREF="https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap">https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap</A><BR>
&gt;<BR>
&gt; itkImageSeriesWriter is wrapped correctly.<BR>
&gt;<BR>
&gt; Thank you and Happy Holidays!<BR>
&gt;<BR>
&gt; Wen<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
&gt; Sent: Fri 12/21/2012 11:10 AM<BR>
&gt; To: Li, Wen<BR>
&gt; Cc: Bradley Lowekamp; insight-users@itk.org<BR>
&gt; Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
&gt;<BR>
&gt; Hello,<BR>
&gt;<BR>
&gt; Doh, I for got that's what the output image type is used for.<BR>
&gt;<BR>
&gt; I don't think I am going to get a chance to revisit this before the holiday.<BR>
&gt;<BR>
&gt; You can take a stab at it an submit a patch yourself if you are successful.<BR>
&gt;<BR>
&gt; Use the ExtractImageFilter as an exemplar in what needs to be done for this case:<BR>
&gt;<BR>
&gt; <A HREF="https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap">https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap</A><BR>
&gt;<BR>
&gt; Brad<BR>
&gt;<BR>
&gt; On Dec 21, 2012, at 9:57 AM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
&gt;<BR>
&gt; &gt; Brad,<BR>
&gt; &gt;<BR>
&gt; &gt; I tried your patch.<BR>
&gt; &gt; The writer is wrapped now but imagetype is unreasonably restricted.<BR>
&gt; &gt;<BR>
&gt; &gt; if I create a pointer like below in python:<BR>
&gt; &gt; writer=itk.ImageSeriesWriter[inputImageType, outputImageType].New()<BR>
&gt; &gt;<BR>
&gt; &gt; the inputImageType and outputImageType have to be exactly the same.<BR>
&gt; &gt;<BR>
&gt; &gt; Aren't we saying, outputImageType should have fewer dimensions than input?<BR>
&gt; &gt; I can live with having them to have the same pixel type but dimension...don't know. I thought &quot;input&quot; is usually 3 and &quot;output&quot; is 2. No?<BR>
&gt; &gt;<BR>
&gt; &gt; Wen<BR>
&gt; &gt;<BR>
&gt; &gt; -----Original Message-----<BR>
&gt; &gt; From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
&gt; &gt; Sent: Thu 12/20/2012 1:58 PM<BR>
&gt; &gt; To: Li, Wen<BR>
&gt; &gt; Cc: Bradley Lowekamp; insight-users@itk.org<BR>
&gt; &gt; Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
&gt; &gt;<BR>
&gt; &gt; Doh,<BR>
&gt; &gt;<BR>
&gt; &gt; Pasted the wrong thing:<BR>
&gt; &gt;<BR>
&gt; &gt; <A HREF="http://review.source.kitware.com/#/c/9026/">http://review.source.kitware.com/#/c/9026/</A><BR>
&gt; &gt;<BR>
&gt; &gt; Heres info on how to review the patch:<BR>
&gt; &gt; <A HREF="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html</A><BR>
&gt; &gt;<BR>
&gt; &gt; Brad<BR>
&gt; &gt;<BR>
&gt; &gt; On Dec 20, 2012, at 1:50 PM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
&gt; &gt;<BR>
&gt; &gt; &gt; Thanks!<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; But where can I find the patch?...<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Wen<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Postdoctoral Fellow<BR>
&gt; &gt; &gt; Bioengineering, Sheikh Zayed Institute<BR>
&gt; &gt; &gt; Children's National Medical Center<BR>
&gt; &gt; &gt; 111 Michigan Ave. NW<BR>
&gt; &gt; &gt; Washington DC, 20010<BR>
&gt; &gt; &gt; Email: wli@cnmc.org<BR>
&gt; &gt; &gt; Phone: 202-476-1268<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; -----Original Message-----<BR>
&gt; &gt; &gt; From: Bradley Lowekamp [<A HREF="mailto:blowekamp@mail.nih.gov">mailto:blowekamp@mail.nih.gov</A>]<BR>
&gt; &gt; &gt; Sent: Thu 12/20/2012 1:33 PM<BR>
&gt; &gt; &gt; To: Li, Wen<BR>
&gt; &gt; &gt; Cc: insight-users@itk.org<BR>
&gt; &gt; &gt; Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Hello,<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; I quickly have put together the following patch. I have things compile but I have not really tested it yet.<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; Let me know if it works,<BR>
&gt; &gt; &gt; Brad<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; On Dec 20, 2012, at 10:52 AM, &quot;Li, Wen&quot; &lt;WLi@childrensnational.org&gt; wrote:<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Hi insight-users,<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; I am using ITK4.2.0 with python 2.7.<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Just discovered that itkImageSeriesWriter is not wrapped by python but the reader is :(<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Can anyone tell me how to hack that? Otherwise how can I write out a dicom image with python?<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Thanks in advance,<BR>
&gt; &gt; &gt; &gt; Wen<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Postdoctoral Fellow<BR>
&gt; &gt; &gt; &gt; Bioengineering, Sheikh Zayed Institute<BR>
&gt; &gt; &gt; &gt; Children's National Medical Center<BR>
&gt; &gt; &gt; &gt; 111 Michigan Ave. NW<BR>
&gt; &gt; &gt; &gt; Washington DC, 20010<BR>
&gt; &gt; &gt; &gt; Email: wli@cnmc.org<BR>
&gt; &gt; &gt; &gt; Phone: 202-476-1268<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; _____________________________________<BR>
&gt; &gt; &gt; &gt; Powered by www.kitware.com<BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Visit other Kitware open-source projects at<BR>
&gt; &gt; &gt; &gt; <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Kitware offers ITK Training Courses, for more information visit:<BR>
&gt; &gt; &gt; &gt; <A HREF="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<BR>
&gt; &gt; &gt; &gt; <A HREF="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>
&gt; &gt; &gt; &gt;<BR>
&gt; &gt; &gt; &gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; &gt; &gt; &gt; <A HREF="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>