[vtkusers] Extract de pixels colours in a image

Amy Squillacote ahs at cfdrc.com
Thu Jun 19 08:58:52 EDT 2008


Hi Elizabeth,

It sounds like vtkImageBlend 
(http://www.vtk.org/doc/nightly/html/classvtkImageBlend.html) is what 
you're looking for.

- Amy

beth at portugalmail.pt wrote:
> Hi all,
>
> I would like to read a image and then extract its pixel colour in order to do 
> some calculations on it.
>
> In my case, I'm using 2 jpeg images. I intend to turn its colour mode from RGB 
> to HSV. Then, I would like to go through its lines and columms, extracting 
> their pixel colours (HSV components) in order to combine bothe images into 
> another one.
>
> My pice of code till now looks like this:
>
> 	vtkJPEGReader *imagem1 = vtkJPEGReader::New();
> 	vtkJPEGReader *imagem2 = vtkJPEGReader::New();
> 	imagem1->SetFileName("imagem1.jpg");
> 	imagem2->SetFileName("imagem2.jpg");
>
> 	vtkImageRGBToHSV *imagemConv1 = vtkImageRGBToHSV::New();
> 	vtkImageRGBToHSV *imagemConv2 = vtkImageRGBToHSV::New();
> 	imagemConv1->SetInputConnection(imagem1->GetOutputPort());
> 	imagemConv2->SetInputConnection(imagem2->GetOutputPort());
>
> Then I don't no what method/class to use in order to implement the rest!
>
> I'm wandering if it could be something like this:
>
> 	vtkImageData *data1 = vtkImageData::New();
> 	vtkSource *source1 = vtkSource::New();
> 	source1->SetInputConnection(imagemConv1->GetOutputPort());
> 	data1->SetSource(source1);
>
> them try through data1 to access the colours componenents, but too many doubts 
> are forcing me to send this help to you...
>
> Thannks and best regards,
>
> Elizabeth
>
>
> __________________________________________________________
> O email preferido dos portugueses agora com
> 2 000 MB de espaço e acesso gratuito à Internet
> http://www.portugalmail.pt/2000mb
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>   

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list