[Paraview] Making vtkImageMathematics available in ParaView filters

Jérôme jerome.velut at gmail.com
Thu Apr 2 12:06:27 EDT 2009


Hi,

Many thanks for your quick answer. The problem I described was observed on
Paraview 3.4 release, debug build. I have a 3.5 CVS (not updated, so bad...)
on which I tried my XML just right now: "Image Math" is no more gray!! I am
able to apply the filter on a single image, with "Add constant", "Multiply
by constant", etc.

The new problem is when I want to add two image. I selected two mandelbrot
sources, then I plugged the "Image Math" filter. The output window claims:
"Input port 0 of algorithm vtkImageMathematics(0x7f081c4bcb70) has 2
connections but is not repeatable".

I tried the repeat_command="1" statement, without optimism and not much
success... It seems that vtkImageMathematics input is old-fashionned, but
the VTK doc says that SetInput1 and SetInput2 is like involking
AddInputConnection. Where do I miss something ???

Thanks for all,

Jerome

2009/4/2 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>

> I justed loaded your XML as a plugin in CVS ParaView is seems to being
> enabled fine. I was able to apply the filter to Mandlebrot source.
> What version of ParaView are you using?
>
> Utkarsh
>
> 2009/4/2 Jérôme <jerome.velut at gmail.com>:
> > Dear all,
> >
> > I am unsuccessfully fighting with XML description of the VTK
> > vtkImageMathematics filter. I want it to be available in the ParaView
> > filters. At the end of this mail is the XML I wrote, widely inspired from
> > "Append Geometry".
> >
> > Note that it is part of a larger file making available
> ImageGaussianSmooth,
> > ImageSobel3D, ImageFilp, SplineFilter, some different sources...
> Everything
> > works well, except Image Mathematics and Image Reslice (I told about
> Reslice
> > in another thread).
> >
> > The symptom is the following : the "Image Math" appears in the filters
> list,
> > but is always unavailable, even if I select one proxy or two in the
> > pipeline. What is the diagnostic, doctors ? Is there a therapy ?
> >
> > Thanks all !
> >
> > Best regards,
> > Jerome
> >
> > <ServerManagerConfiguration>
> >    <ProxyGroup name="filters">
> >       <!--
> > ================================================================== -->
> >       <SourceProxy name="ImageMathematics" class="vtkImageMathematics"
> > label="Image Math">
> >          <Documentation
> >                        long_help="Provides some image operations, one or
> two
> > inputs."
> >                        short_help="vtkImageMathematics filter.">
> >          </Documentation>
> >       <InputProperty
> >          name="Input"
> >          command="AddInputConnection"
> >          clean_command="RemoveAllInputs"
> >          multiple_input="1">
> >            <ProxyGroupDomain name="groups">
> >              <Group name="sources"/>
> >              <Group name="filters"/>
> >            </ProxyGroupDomain>
> >            <DataTypeDomain name="input_type">
> >              <DataType value="vtkImageData"/>
> >            </DataTypeDomain>
> >            <Documentation>
> >              Set the input to the Append Geometry filter.
> >            </Documentation>
> >       </InputProperty>
> >
> >          <IntVectorProperty
> >                            name="Operation"
> >                            command="SetOperation"
> >                            number_of_elements="1"
> >                            default_values="0">
> >
> >             <EnumerationDomain name="enum">
> >                <Entry value="0" text="Add"/>
> >                <Entry value="1" text="Substract"/>
> >                <Entry value="2" text="Multiply"/>
> >                <Entry value="3" text="Divide"/>
> >                <Entry value="4" text="Invert"/>
> >                <Entry value="5" text="Sin"/>
> >                <Entry value="6" text="Cos"/>
> >                <Entry value="7" text="Exp"/>
> >                <Entry value="8" text="Log"/>
> >                <Entry value="9" text="Abs"/>
> >                <Entry value="10" text="Sqr"/>
> >                <Entry value="11" text="Sqrt"/>
> >                <Entry value="12" text="Min"/>
> >                <Entry value="13" text="Max"/>
> >                <Entry value="14" text="Atan"/>
> >                <Entry value="15" text="Atan2"/>
> >                <Entry value="16" text="Multiply by k"/>
> >                <Entry value="17" text="Add c"/>
> >                <Entry value="18" text="Conjugate"/>
> >                <Entry value="19" text="Complex multiply"/>
> >                <Entry value="20" text="Replace by k"/>
> >             </EnumerationDomain>
> >          </IntVectorProperty>
> >
> >          <DoubleVectorProperty
> >                               name="ConstantK"
> >                               command="SetConstantK"
> >                               number_of_elements="1"
> >                               default_values="1">
> >          </DoubleVectorProperty>
> >
> >          <DoubleVectorProperty
> >                               name="ConstantC"
> >                               command="SetConstantC"
> >                               number_of_elements="1"
> >                               default_values="0">
> >          </DoubleVectorProperty>
> >
> >          <IntVectorProperty
> >                            name="DivideByZeroToC"
> >                            command="SetDivideByZeroToC"
> >                            number_of_elements="1"
> >                            default_values="1">
> >             <BooleanDomain name="boolean"/>
> >          </IntVectorProperty>
> >
> >       </SourceProxy>
> >       <!-- End ImageMathematics -->
> >    </ProxyGroup>
> >    <!-- End Filters Group -->
> > </ServerManagerConfiguration>
> >
> >
> >
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090402/350fa191/attachment.htm>


More information about the ParaView mailing list