[vtkusers] Marking a pixel with a filled circle
David Doria
daviddoria+vtk at gmail.com
Mon Dec 7 08:46:10 EST 2009
On Sun, Dec 6, 2009 at 11:38 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Sun, Dec 6, 2009 at 8:23 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>
>> Sorry, I somehow completely missed the part about vtkImageBlend. It seems
>> like an enormous pain though - I tried to make an example:
>> http://www.vtk.org/Wiki/VTK_Examples_Combine_Images
>>
>> but it seems to be expecting a vtkImageStencilData. I tried to use
>> vtkImageStencil but I don't understand what is going on - can you help
>> clarify?
>
> It doesn't need a vtkImageStencilData, the test just uses that feature
> in order to test it. Just give ImageBlend two images as input, it
> doesn't need anything else.
>
>
>> I'll work on a vtkSurfacePicker example and let you know if there are any
>> questions/problems.
>
> There is an example, or at least, there is an example of it's subclass
> vtkVolumePicker. Look in
> Examples/VolumeRendering/Python/VolumePicker.py. There are also tests
> (in tcl) that use VolumePicker and SurfacePicker.
>
> All the examples that I made are volume-centric, though. There
> aren't any good examples for using vtkSurfacePicker with images.
>
>
>> Thanks for your help David G (too many David's around here, haha)!
>
> You're welcome. There's never too many Davids, it makes it easier to
> remember people's names if everyone's name's the same.
>
> David
>
Hmm, that was the first thing I tried:
vtkSmartPointer<vtkImageBlend> blend = vtkSmartPointer<vtkImageBlend>::New();
blend->SetInputConnection(0, JPEGReader1->GetOutputPort());
blend->SetInputConnection(1, JPEGReader2->GetOutputPort());
But the error was:
Input for connection index 0 on input port index 1 for algorithm
vtkImageBlend(0x97d7930) is of type vtkImageData, but a
vtkImageStencilData is required.
Thanks,
David
More information about the vtkusers
mailing list