[Insight-users] Pad image with 0 but keep its type what ever it is

Mike Jackson mike.jackson at bluequartz.net
Sat Jan 30 08:27:05 EST 2010


You could use C++ templates to instantiate the type of InputPixelType
that you want which could be used as an input argument to the program.
In Order to NOT have that type of argument you would need to be able
to use NON-Itk classes to read part of the input image in order to
determine what type of pixels are being used and then instantiate the
correct type of output pixel type.
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net

On Sat, Jan 30, 2010 at 5:32 AM,  <lynx.abraxas at freenet.de> wrote:
> On 28/01/10 17:00:57, Luis Ibanez wrote:
>> Hi Lynx,
>>
>>
>>          What *exactly*
>>          is the problem that you are observing ?
>>
>
> Thanks Luis for Your answer.
> My  main  problem  is that I'd like to create a single program to pad an input
> image of arbitary InputPixelType with zeros. If I use my code  it  only  works
> for unsigned short InputPixelType. Is there a way to make my code work for any
> InputPixelType? Or would I have to create many programs  (eg  pad_uc,  pad_us,
> pad_float...) where each single one is just for one InputPixelType?
> Or  asked  differently:  Is  it possible to code the padding without having to
> specify the InputPixelType?
>
> Thanks for any help or hint on this.
> Lynx
>
>
> _____________________________________
> 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.html
>
> 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
>


More information about the Insight-users mailing list