[Insight-users] reader is wrapped but not the writer?

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Dec 21 11:10:33 EST 2012


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 at 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 at mail.nih.gov]
> Sent: Thu 12/20/2012 1:58 PM
> To: Li, Wen
> Cc: Bradley Lowekamp; insight-users at 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 at 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 at cnmc.org
> > Phone: 202-476-1268
> >
> >
> >
> >
> > -----Original Message-----
> > From: Bradley Lowekamp [mailto:blowekamp at mail.nih.gov]
> > Sent: Thu 12/20/2012 1:33 PM
> > To: Li, Wen
> > Cc: insight-users at 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 at 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 at 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
> >
> >
> >
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121221/ca86e168/attachment-0001.htm>


More information about the Insight-users mailing list