[prev in list] [next in list] [prev in thread] [next in thread] 

List:       insight-users
Subject:    Re: [Insight-users] reader is wrapped but not the writer?
From:       "Li, Wen" <WLi () childrensnational ! org>
Date:       2012-12-21 18:41:29
Message-ID: EA8A40C7EA6E3341854FA5A4B4FA2D9B077DD7A5 () EXCHVS02 ! cnmc ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Attached file is here.

Wen


-----Original Message-----
From: insight-users-bounces@itk.org on behalf of Li, Wen
Sent: Fri 12/21/2012 1:36 PM
To: Bradley Lowekamp
Cc: insight-users@itk.org
Subject: Re: [Insight-users] reader is wrapped but not the writer?
 
Hi,

Since I am not working on a branch (just downloaded source code from ITK), I attached \
the file here. Hope that after the holiday, you can submit the patch for me. Thank \
you!

Wen

Postdoctoral Fellow
Bioengineering, Sheikh Zayed Institute
Children's National Medical Center
111 Michigan Ave. NW
Washington DC, 20010
Email: wli@cnmc.org
Phone: 202-476-1268




-----Original Message-----
From: Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]
Sent: Fri 12/21/2012 1:33 PM
To: Li, Wen
Cc: Bradley Lowekamp; insight-users@itk.org
Subject: Re: [Insight-users] reader is wrapped but not the writer?
 
Hello,

That is great you were able to wrap the class.

It would be even better to contribute that back to the community. The ideal way is to \
submit a patch to gerrit for review:

http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html


Next would be to fork the github repository and push a patch to your fork.

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!

Thanks,
Brad

On Dec 21, 2012, at 1:23 PM, "Li, Wen" <WLi@childrensnational.org> wrote:

> OK. by mimic wrapping of ExtractImageFilter:
> 
> https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap
>  
> itkImageSeriesWriter is wrapped correctly.
> 
> Thank you and Happy Holidays!
> 
> Wen
> 
> -----Original Message-----
> From: Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]
> Sent: Fri 12/21/2012 11:10 AM
> To: Li, Wen
> Cc: Bradley Lowekamp; insight-users@itk.org
> Subject: Re: [Insight-users] reader is wrapped but not the writer?
> 
> Hello,
> 
> Doh, I for got that's what the output image type is used for.
> 
> I don't think I am going to get a chance to revisit this before the holiday.
> 
> You can take a stab at it an submit a patch yourself if you are successful.
> 
> Use the ExtractImageFilter as an exemplar in what needs to be done for this case:
> 
> https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/wrapping/itkExtractImageFilter.wrap
>  
> Brad
> 
> On Dec 21, 2012, at 9:57 AM, "Li, Wen" <WLi@childrensnational.org> wrote:
> 
> > Brad,
> > 
> > I tried your patch.
> > The writer is wrapped now but imagetype is unreasonably restricted.
> > 
> > if I create a pointer like below in python:
> > writer=itk.ImageSeriesWriter[inputImageType, outputImageType].New()
> > 
> > the inputImageType and outputImageType have to be exactly the same.
> > 
> > Aren't we saying, outputImageType should have fewer dimensions than input?
> > I can live with having them to have the same pixel type but dimension...don't \
> > know. I thought "input" is usually 3 and "output" is 2. No? 
> > Wen
> > 
> > -----Original Message-----
> > From: Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]
> > Sent: Thu 12/20/2012 1:58 PM
> > To: Li, Wen
> > Cc: Bradley Lowekamp; insight-users@itk.org
> > Subject: Re: [Insight-users] reader is wrapped but not the writer?
> > 
> > Doh,
> > 
> > Pasted the wrong thing:
> > 
> > http://review.source.kitware.com/#/c/9026/
> > 
> > Heres info on how to review the patch:
> > http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/CommunitySoftwareProcess/PerformAGerritReview/index.html
> >  
> > Brad
> > 
> > On Dec 20, 2012, at 1:50 PM, "Li, Wen" <WLi@childrensnational.org> wrote:
> > 
> > > Thanks!
> > > 
> > > But where can I find the patch?...
> > > 
> > > Wen
> > > 
> > > Postdoctoral Fellow
> > > Bioengineering, Sheikh Zayed Institute
> > > Children's National Medical Center
> > > 111 Michigan Ave. NW
> > > Washington DC, 20010
> > > Email: wli@cnmc.org
> > > Phone: 202-476-1268
> > > 
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]
> > > Sent: Thu 12/20/2012 1:33 PM
> > > To: Li, Wen
> > > Cc: insight-users@itk.org
> > > Subject: Re: [Insight-users] reader is wrapped but not the writer?
> > > 
> > > Hello,
> > > 
> > > I quickly have put together the following patch. I have things compile but I \
> > > have not really tested it yet. 
> > > Modules/IO/ImageBase/wrapping/itkImageSeriesWriter.wrap
> > > 
> > > Let me know if it works,
> > > Brad
> > > 
> > > On Dec 20, 2012, at 10:52 AM, "Li, Wen" <WLi@childrensnational.org> wrote:
> > > 
> > > > Hi insight-users,
> > > > 
> > > > I am using ITK4.2.0 with python 2.7.
> > > > 
> > > > Just discovered that itkImageSeriesWriter is not wrapped by python but the \
> > > > reader is :( 
> > > > Can anyone tell me how to hack that? Otherwise how can I write out a dicom \
> > > > image with python? 
> > > > Thanks in advance,
> > > > Wen
> > > > 
> > > > Postdoctoral Fellow
> > > > Bioengineering, Sheikh Zayed Institute
> > > > Children's National Medical Center
> > > > 111 Michigan Ave. NW
> > > > Washington DC, 20010
> > > > Email: wli@cnmc.org
> > > > Phone: 202-476-1268
> > > > 
> > > > 
> > > > 
> > > > _____________________________________
> > > > Powered by www.kitware.com
> > > > 
> > > > Visit other Kitware open-source projects at
> > > > http://www.kitware.com/opensource/opensource.html
> > > > 
> > > > Kitware offers ITK Training Courses, for more information visit:
> > > > http://www.kitware.com/products/protraining.php
> > > > 
> > > > 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
> > > 
> > > 
> > > 
> > 
> > 
> > 
> 
> 
> 


[Attachment #5 (text/html)]

<!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>Attached file is here.<BR>
<BR>
Wen<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: insight-users-bounces@itk.org on behalf of Li, Wen<BR>
Sent: Fri 12/21/2012 1:36 PM<BR>
To: Bradley Lowekamp<BR>
Cc: insight-users@itk.org<BR>
Subject: Re: [Insight-users] reader is wrapped but not the writer?<BR>
<BR>
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/CommunitySoftwareP \
rocess/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/Communit \
ySoftwareProcess/PerformAGerritReview/index.html">http://insightsoftwareconsortium.git \
hub.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>
<BR>
</FONT>
</P>

</BODY>
</HTML>


["itkImageSeriesWriter.wrap" (application/octet-stream)]

_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic