[Insight-users] Setting RGB components

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jul 9 14:13:37 EDT 2009


Le 9 juil. 09 à 15:42, Rick Giuly a écrit :

>
> Thanks, that looks like exactly what I need. (I'm not sure why I  
> didn't see that, maybe a needle in a haystack effect-- or maybe  
> because my browser jumps around in the itk list of classes page in a  
> weird non-alphabetical way as I search.)
>
> I'm using pythonxy. This search function looks useful, but it's not  
> working for me. Is this something the pythonxy administrator would  
> need to enable?

it must be in WrapITK at google code.
A good idea may be to ask pythonxy if they can use this newer version  
rather than the one packaged with ITK.

Gaëtan

>
> >>> itk.search("rgb")
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "O:\software\pythonxy\python\lib\site-packages\itk\module 
> \Python\itkLazy.
> py", line 14, in __getattribute__
>    value = types.ModuleType.__getattribute__(self, attr)
> AttributeError: 'LazyITKModule' object has no attribute 'search'
> >>>
>
> Gaëtan Lehmann wrote:
>> Le 9 juil. 09 à 15:02, Rick Giuly a écrit :
>>>
>>> As far as I can tell, the FillBuffer() method takes a single RGB  
>>> triple as an argument and fills the whole buffer with it. What I  
>>> need is a way to take 3 different images, and copy them into the  
>>> red, green, and blue channels of an RGB image.
>> Hi Rick,
>> I think ComposeRGBImageFilter is what you need.
>> BTW, found it simply with itk.search("rgb") in python interpreter.  
>> Sometime, it can help a lot to find what you're searching for!
>> Gaëtan
>>>
>>> Bill Lorensen wrote:
>>>> You should be able to use the FillBuffer() method applied to Image.
>>>> On Thu, Jul 9, 2009 at 4:05 AM, Rick Giuly<rgiuly at gmail.com> wrote:
>>>>> Hello All,
>>>>>
>>>>> Is there a simple way to set the R, G, and B components of an  
>>>>> image?
>>>>>
>>>>> Or, as a backup plan, is there a simple way to set the  
>>>>> components of a
>>>>> vector image with 3 components.
>>>>>
>>>>> The user guide talks about setting pixels one at a time but I'm  
>>>>> looking for
>>>>> something like
>>>>>
>>>>> rgbImage.SetRed(image1)
>>>>> rgbImage.SetBlue(image2)
>>>>> rbbImage.SetGreen(image3)
>>>>>
>>>>> or for a vector image, which I could convert to rgb
>>>>>
>>>>> vectorImage.SetComponent0(image1)
>>>>> vectorImage.SetComponent1(image2)
>>>>> vectorImage.SetComponent2(image3)
>>>>>
>>>>> I noticed there's a section in the manual about Extracting  
>>>>> Components from
>>>>> Vector Images but I didn't find one about setting the components.
>>>>>
>>>>> (I'm using WrapITK and python.)
>>>>>
>>>>> -Rick
>>>>> _____________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.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
>>>>>
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.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
>

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090709/ec33ae85/attachment-0001.pgp>


More information about the Insight-users mailing list