[Paraview] Problems blending two vtkImageMapToColors with vtkImageBlend in ParaView branding App

Jorge Gerardo Peña Pastor jorge.pena.pastor at gmail.com
Fri Jan 7 07:34:41 EST 2011


Hi,

I'm trying to blend two vtkImageMapToColors, and I have the following questions:

1) When I try to create the vtkImageMapToColors filters to be passed
later as blending inputs

     m_colorImage =
objectBuilder->createFilter("filters","ImageMapToColors",m_input);

I get the following error/warning:

   "vtkImageMapToColors : RequestInformation: No LookupTable was set"

Nevertheless, when I assign the LUT later, it works as expected. So my
question is:
How should I create the filter to prevent the LUT required warning?

Note: I saw under documentation, that there is the following method
that should do the trick...but I couldn't find the way to pass my
lut's vtkSMProxy as QVariant...

createFilter (const QString &group,
                  const QString &name,
                  QMap< QString, QList< pqOutputPort * > > namedInputs,
                  pqServer *server,
                  const QMap< QString, QVariant > &properties)

2) What should I do to set the alpha channels of a
vtkDiscretizableColorTransferFunction? I can use the addRGBPoint, but
it doesn't accept RGBA as input. Thus I cannot use this lut to blend
the images.

3) Alternatively, I want to use the following method of vtkImageBlend

void 	SetOpacity (int idx, double opacity)

But I don't know how to write the xml for that proxy property. Should
I use vtkSMDoubleVectorProperty and pass both values? Here there's my
actual xml file for vtkImageBlend

   <SourceProxy name="ImageBlend" class="vtkImageBlend" label="ImageBlend">
     <InputProperty
        name="Input"
        command="SetInputConnection">
           <ProxyGroupDomain name="groups">
             <Group name="sources"/>
             <Group name="filters"/>
           </ProxyGroupDomain>
           <DataTypeDomain name="input_type">
             <DataType value="vtkDataImage"/>
           </DataTypeDomain>
      </InputProperty>
     <InputProperty
        name="BlendInput"
        command="SetInputConnection">
           <ProxyGroupDomain name="groups">
             <Group name="sources"/>
             <Group name="filters"/>
           </ProxyGroupDomain>
           <DataTypeDomain name="input_type">
             <DataType value="vtkDataImage"/>
           </DataTypeDomain>
      </InputProperty>
   </SourceProxy>


More information about the ParaView mailing list