[Paraview] Accessing mappers from within Paraview

Christian Werner christian.werner at rwth-aachen.de
Wed Apr 7 11:02:58 EDT 2010


Hi!

Thanks for the quick reply. I made it a writer and I am now able to 
access the plugin in Python. That's great, but somehow it doesn't 
execute. I can now set the FileName (which I forgot to mention in the 
xml), but I can't get it executed. The plugin is derived from 
vtkImageAlgorithm, but the RequestData method does not seem to be 
called. How do I trigger it?

Best regards,
Christian


Utkarsh Ayachit wrote:
> Christian,
>
> Any reason why you are not making it a writer? To me it doesn't seem
> anything different than that except looks like you are not explicitly
> specifying the filename (is it hard coded?).
>
> Utkarsh
>
>
> On Wed, Apr 7, 2010 at 7:16 AM, Christian Werner
> <christian.werner at rwth-aachen.de> wrote:
>   
>> Hi!
>>
>> I just wrote a nice mapper which writes some data to the disk, taking a
>> volume as input. I thought I could access it from the "Filters" menu, but
>> this wasn't possible. In future, this mapper should be called from the
>> python shell, but there, it isn't known either:
>>
>>     
>>>>> help(MeasureObjects)
>>>>>           
>> Traceback (most recent call last):
>>
>> File "<console>", line 1, in <module>
>>
>> NameError: name 'MeasureObjects' is not defined
>>
>>
>> The plugin-manager however says, that he loaded my plugin ("...is definetely
>> a paraview plugin..."). It shows up as "loaded" when verifying this.
>>
>> The plugin is not intended as a writer or something like that, it just looks
>> at the input and writes something to the disk which Paraview couldn't use
>> for anything anyway. Here is my xml content:
>>
>> <ServerManagerConfiguration>
>>  <!-- This is the server manager configuration XML. It defines the interface
>> to
>>      our new filter. As a rule of thumb, try to locate the configuration for
>>      a filter already in ParaView (in Servers/ServerManager/Resources/*.xml)
>>      that matches your filter and then model your xml on it -->
>>  <ProxyGroup name="mappers">
>>  <SourceProxy name="MeasureObjects" class="vtkMeasureObjects"
>> label="MeasureObjects">
>>    <Documentation
>>       long_help="Measures objects (connected components) in a volume."
>>       short_help="Classical measuring.">
>>   This is classical object measuring filter.
>>    </Documentation>
>>    <InputProperty
>>       name="Input"
>>       command="SetInputConnection">
>>          <ProxyGroupDomain name="groups">
>>            <Group name="sources"/>
>>            <Group name="filters"/>
>>          </ProxyGroupDomain>
>>          <DataTypeDomain name="input_type">
>>            <DataType value="vtkImageData"/>
>>          </DataTypeDomain>
>>     </InputProperty>
>>  <!-- End MeasureObjects -->
>>  </SourceProxy>
>> </ProxyGroup>
>> </ServerManagerConfiguration>
>>
>>
>> If I define the plugin as a filter then Paraview complains about not having
>> an output port.
>>
>> Any suggestions?
>>
>>
>> Best regards,
>> Christian
>> _______________________________________________
>> 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
>>
>>     



More information about the ParaView mailing list