[Paraview] problems with repeatable input to filter

2009-02-20 Thread Natalie Happenhofer

Hi!
I´m trying to write a filter with multiple inputs, in my case I need two 
datasets as input to this filter. In order to achieve that, I have the 
following routine in my code:

int vtkTauFilter::FillInputInformation(int port, vtkInformation* info)
{
 info - Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(),vtkDataSet);
 info - Set(vtkAlgorithm::INPUT_IS_REPEATABLE(), 1);
 return 1;
}

and I put in the /Servers/ServerManager/Resources/filters.xml file the 
following:

 SourceProxy name=TauFilter class=vtkTauFilter label=TauFilter
 
 InputProperty name=Input command=AddInputConnection 
clean_command=RemoveAllInputs multiple_input=1
 ProxyGroupDomain name=groups
 Group name=sources/
 Group name=filters/
 /ProxyGroupDomain

 ...
 /SourceProxy


Compiling Paraview works fine, but I get the error:
ERROR: In /ParaView-3.4.0/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 732
vtkCompositeDataPipeline (0x357dd50): Input port 0 of algorithm 
vtkTauFilter(0x357bff0) has 2 connections but is not repeatable.

Does anyone know what´s could be the problem here?

thx a lot,
Natalie


_
Encuentra a tu media naranja con MSN Amor y Amistad
http://amor.latam.msn.com/channel/index.aspx?trackingid=202694___
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


Re: [Paraview] problems with repeatable input to filter

2009-02-20 Thread Jeff Baumes
 void vtkBlahFilter::SetDataSet1Connection(vtkAlgorithmOutput* algOutput)
 {
  this-SetInputConnection(0, algOutput);
 }
 void vtkBlahFilter::SetDataSet2Connection(vtkAlgorithmOutput* algOutput)
 {
  this-SetInputConnection(0, algOutput);
 }

Burlen's code looks right, but I believe the SetDataSet2Connection
should be like this (change 0 to 1):

void vtkBlahFilter::SetDataSet2Connection(vtkAlgorithmOutput* algOutput)
 {
 this-SetInputConnection(1, algOutput);
}
___
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


[Paraview] vtkCompositeDataSet - memory ?

2009-02-20 Thread Jacques Papper
Hi all, 

I'm writing a reader for a dataset which has boundary faces (tri and quads)
as well as volume cells (tets etc..). 
In would like to use a CompositeDataSet as a container, so that I can easily
extract boundary faces which are groupesd in named zones (for ex: upper_surf
lower_surf etc...). 

The problem I encounter is that if I us a vtkMultiblockDataSet composed of
vtkUnstructuredGrid there is no relationship between the separate blocks.
This means that I need to duplicate points which are shared between the
different blocks, duplicate the data associated to thes points etc ... 

Is there a vtkCompositeDataSet where all the points and data are shared
between the branches and the only difference is the cells ?

Thank you for your guidance. 

Jacques PAPPER
Applied CFD Team Leader
Tel: +44 (0) 1234 324677


---
This email contains information that is private and confidential and is 
intended only for the addressee.  If you are not the intended recipient please 
delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other 
than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 
503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 
196351245


___
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


Re: [Paraview] Changing the default volume mapper in Paraview?

2009-02-20 Thread Biao She
Yes, I have. But it doesn't work.

On Fri, Feb 20, 2009 at 6:56 AM, Utkarsh Ayachit 
utkarsh.ayac...@kitware.com wrote:

 Have you tried just removing the property
 LockSampleDistanceToInputSpacing from the XML?

 Utkarsh

 On Thu, Feb 19, 2009 at 5:26 PM, Biao She sheb...@gmail.com wrote:
  Thanks very much for your help, Utkarsh.
  The OpenGLVolumeTextureMapper3D works right now.
  Just for future reference, here are instructions to make a volume mapper
  available in paraview:
  1. open the rendering.xml file at the
  /$Paraveiw-Source-Directory/Servers/ServerManager/
  Resources directory.
  2. copy the SourceProxy definition of FixedPointVolumeRayCastMapper,
 paste
  it after the definition and made the following changes: (the bold ones
 are
  the places where I made changes )
  SourceProxy name=OpenGLVolumeTextureMapper3D
class=vtkOpenGLVolumeTextureMapper3D
InputProperty
  name=Input
  command=SetInputConnection
  DataTypeDomain name=input_type
DataType value=vtkImageData/
  /DataTypeDomain
/InputProperty
StringVectorProperty
  name=SelectScalarArray
  command=SelectScalarArray
  number_of_elements=1
  animateable=0
  ArrayListDomain name=array_list attribute_type=Scalars
RequiredProperties
  Property name=Input function=Input/
/RequiredProperties
  /ArrayListDomain
/StringVectorProperty
IntVectorProperty
  name=ScalarMode
  command=SetScalarMode
  default_values=3
  number_of_elements=1
  animateable=0
  EnumerationDomain name=enum
Entry value=0 text=Default/
Entry value=1 text=PointData/
Entry value=2 text=CellData/
Entry value=3 text=PointFieldData/
Entry value=4 text=CellFieldData/
  /EnumerationDomain
/IntVectorProperty
IntVectorProperty
  name=LockSampleDistanceToInputSpacing
  command=SetLockSampleDistanceToInputSpacing
  default_values=1
  number_of_elements=1
  animateable=0
  BooleanDomain name=bool /
/IntVectorProperty
!-- End of FixedPointVolumeRayCastMapper --
  /SourceProxy
  3. find the SubProxy of VolumeFixedPointRayCastMapper, make the following
  change (bold):
  SubProxy
  Proxy name=VolumeFixedPointRayCastMapper
proxygroup=mappers
proxyname=OpenGLVolumeTextureMapper3D
  /Proxy
  ExposedProperties
Property name=LockSampleDistanceToInputSpacing /
  /ExposedProperties
  /SubProxy
  4. find the header file of vtkOpenGLVolumeTextureMapper3D at the
  /$Paraveiw-Source-Directory/VTK/VolumeRendering/ directory.
  add vtkSetClampMacro( LockSampleDistanceToInputSpacing, int, 0, 1 ); as
  public method,
  add int  LockSampleDistanceToInputSpacing; as a protected variable.
  5. compile your program and go.
 
  I understand that vtkOpenGLVolumeTextureMapper3D mapper doesn't need a
  property of LockSampleDistanceToInputSpacing, but this is the fastest
 way
  for me to make the mapper works.
  Any clue about how to get rid of the variable?
  Thanks again for all the helps!
 
  Biao
 
  On Thu, Feb 19, 2009 at 2:35 PM, Utkarsh Ayachit
  utkarsh.ayac...@kitware.com wrote:
 
  No, unless you changed the name for the subproxy which is the name
  in SubProxyProxy name=.. //SubProxy. I'll leave that as is so
  the vtkSMUniformGridVolumeRepresentationProxy will just work.
 
  On Thu, Feb 19, 2009 at 4:33 PM, Biao She sheb...@gmail.com wrote:
   Sorry, please ignore the first question. I know what you mean right
 now.
   But, please look at the second question:
   Also, I notice that in the vtkSMUniformGridVolumeRepresen
   tationProxy.cxx file (Servers/ServerManager/), between line 100~117,
   there
   are some code specifically related to VolumeFixedPointRayCastMapper,
 do
   I
   need to change these codes too?
  
   Thanks,
  
   Biao
  
   On Thu, Feb 19, 2009 at 2:27 PM, Biao She sheb...@gmail.com wrote:
  
   I didn't add a new proxy definition for
 OpenGLVolumeTextureMapper3D.
   Instead, I change the definition for VolumeFixedPointRayCastMapper
 to
   something like that:
   SubProxy
Proxy name=VolumeFixedPointRayCastMapper
  proxygroup=mappers
  proxyname=OpenGLVolumeTextureMapper3D
/Proxy
 /SubProxy
   It didn't work.
   By now, I have tried to add a new proxy definition for
   OpenGLVolumeTextureMapper3D, but I got the same error message. The
   following is the XML proxy I wrote:
   SubProxy
   Proxy name=VolumeOpenGLTexture3DMapper
 proxygroup=mappers
 proxyname=OpenGLVolumeTextureMapper3D
   /Proxy
   ExposedProperties
 Property name=SampleDistance /
   /ExposedProperties
   /SubProxy
   I am wondering if I understand you incorrect.

Re: [Paraview] vtkCompositeDataSet - memory ?

2009-02-20 Thread Moreland, Kenneth
You can share the points by simply creating one vtkPoints object and then 
passing those points to all the unstructured grids in your data object.  Then 
all the blocks will be sharing that data.

Note, however, that ParaView will not actually check that.  Thus it will 
probably incorrectly count the number of points and the amount of memory the 
points take up multiple times, one for each block.  Also, if you pass the data 
through a filter that changes the points, those downstream filters will 
replicate their point data.

-Ken


On 2/20/09 12:23 PM, Jacques Papper jpap...@ara.co.uk wrote:

Hi all,

I'm writing a reader for a dataset which has boundary faces (tri and quads)
as well as volume cells (tets etc..).
In would like to use a CompositeDataSet as a container, so that I can easily
extract boundary faces which are groupesd in named zones (for ex: upper_surf
lower_surf etc...).

The problem I encounter is that if I us a vtkMultiblockDataSet composed of
vtkUnstructuredGrid there is no relationship between the separate blocks.
This means that I need to duplicate points which are shared between the
different blocks, duplicate the data associated to thes points etc ...

Is there a vtkCompositeDataSet where all the points and data are shared
between the branches and the only difference is the cells ?

Thank you for your guidance.

Jacques PAPPER
Applied CFD Team Leader
Tel: +44 (0) 1234 324677


---
This email contains information that is private and confidential and is 
intended only for the addressee.  If you are not the intended recipient please 
delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other 
than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 
503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 
196351245


___
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




     Kenneth Moreland
***  Sandia National Laboratories
***
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
***  web:   http://www.cs.unm.edu/~kmorel

___
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


Re: [Paraview] vtkCompositeDataSet - memory ?

2009-02-20 Thread Andy Bauer
If all of the grids that are used in the vtkMultiBlockDataSet derive from
vtkPointSet, you can use the same vtkPoints for each of the grids.  They
should also have the same vtkPointData as a result so that data is not
duplicated.

Andy

On Fri, Feb 20, 2009 at 2:23 PM, Jacques Papper jpap...@ara.co.uk wrote:

 Hi all,

 I'm writing a reader for a dataset which has boundary faces (tri and quads)
 as well as volume cells (tets etc..).
 In would like to use a CompositeDataSet as a container, so that I can
 easily
 extract boundary faces which are groupesd in named zones (for ex:
 upper_surf
 lower_surf etc...).

 The problem I encounter is that if I us a vtkMultiblockDataSet composed of
 vtkUnstructuredGrid there is no relationship between the separate blocks.
 This means that I need to duplicate points which are shared between the
 different blocks, duplicate the data associated to thes points etc ...

 Is there a vtkCompositeDataSet where all the points and data are shared
 between the branches and the only difference is the cells ?

 Thank you for your guidance.

 Jacques PAPPER
 Applied CFD Team Leader
 Tel: +44 (0) 1234 324677


 ---
 This email contains information that is private and confidential and is
 intended only for the addressee.  If you are not the intended recipient
 please delete it and notify us immediately by e-mailing the sender.
 Note: All email sent to or from this address may be accessed by someone
 other than the recipient, for system management and security reasons.
 Aircraft Research Association Ltd.  Registered in England, Registration No
 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB
 196351245


 ___
 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

___
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


Re: [Paraview] Changing the default volume mapper in Paraview?

2009-02-20 Thread Utkarsh Ayachit
In that case simply remove  the command attribute from  the
LockSampleDistanceToInputSpacing property. That way ParaView will
not try to call that method on the vtkOpenGLVolumeTextureMapper3D
class.

Utkarsh

On Fri, Feb 20, 2009 at 2:25 PM, Biao She sheb...@gmail.com wrote:
 Yes, I have. But it doesn't work.

 On Fri, Feb 20, 2009 at 6:56 AM, Utkarsh Ayachit
 utkarsh.ayac...@kitware.com wrote:

 Have you tried just removing the property
 LockSampleDistanceToInputSpacing from the XML?

 Utkarsh

 On Thu, Feb 19, 2009 at 5:26 PM, Biao She sheb...@gmail.com wrote:
  Thanks very much for your help, Utkarsh.
  The OpenGLVolumeTextureMapper3D works right now.
  Just for future reference, here are instructions to make a volume mapper
  available in paraview:
  1. open the rendering.xml file at the
  /$Paraveiw-Source-Directory/Servers/ServerManager/
  Resources directory.
  2. copy the SourceProxy definition of FixedPointVolumeRayCastMapper,
  paste
  it after the definition and made the following changes: (the bold ones
  are
  the places where I made changes )
  SourceProxy name=OpenGLVolumeTextureMapper3D
class=vtkOpenGLVolumeTextureMapper3D
InputProperty
  name=Input
  command=SetInputConnection
  DataTypeDomain name=input_type
DataType value=vtkImageData/
  /DataTypeDomain
/InputProperty
StringVectorProperty
  name=SelectScalarArray
  command=SelectScalarArray
  number_of_elements=1
  animateable=0
  ArrayListDomain name=array_list attribute_type=Scalars
RequiredProperties
  Property name=Input function=Input/
/RequiredProperties
  /ArrayListDomain
/StringVectorProperty
IntVectorProperty
  name=ScalarMode
  command=SetScalarMode
  default_values=3
  number_of_elements=1
  animateable=0
  EnumerationDomain name=enum
Entry value=0 text=Default/
Entry value=1 text=PointData/
Entry value=2 text=CellData/
Entry value=3 text=PointFieldData/
Entry value=4 text=CellFieldData/
  /EnumerationDomain
/IntVectorProperty
IntVectorProperty
  name=LockSampleDistanceToInputSpacing
  command=SetLockSampleDistanceToInputSpacing
  default_values=1
  number_of_elements=1
  animateable=0
  BooleanDomain name=bool /
/IntVectorProperty
!-- End of FixedPointVolumeRayCastMapper --
  /SourceProxy
  3. find the SubProxy of VolumeFixedPointRayCastMapper, make the
  following
  change (bold):
  SubProxy
  Proxy name=VolumeFixedPointRayCastMapper
proxygroup=mappers
proxyname=OpenGLVolumeTextureMapper3D
  /Proxy
  ExposedProperties
Property name=LockSampleDistanceToInputSpacing /
  /ExposedProperties
  /SubProxy
  4. find the header file of vtkOpenGLVolumeTextureMapper3D at the
  /$Paraveiw-Source-Directory/VTK/VolumeRendering/ directory.
  add vtkSetClampMacro( LockSampleDistanceToInputSpacing, int, 0, 1 );
  as
  public method,
  add int  LockSampleDistanceToInputSpacing; as a protected variable.
  5. compile your program and go.
 
  I understand that vtkOpenGLVolumeTextureMapper3D mapper doesn't need a
  property of LockSampleDistanceToInputSpacing, but this is the fastest
  way
  for me to make the mapper works.
  Any clue about how to get rid of the variable?
  Thanks again for all the helps!
 
  Biao
 
  On Thu, Feb 19, 2009 at 2:35 PM, Utkarsh Ayachit
  utkarsh.ayac...@kitware.com wrote:
 
  No, unless you changed the name for the subproxy which is the name
  in SubProxyProxy name=.. //SubProxy. I'll leave that as is so
  the vtkSMUniformGridVolumeRepresentationProxy will just work.
 
  On Thu, Feb 19, 2009 at 4:33 PM, Biao She sheb...@gmail.com wrote:
   Sorry, please ignore the first question. I know what you mean right
   now.
   But, please look at the second question:
   Also, I notice that in the vtkSMUniformGridVolumeRepresen
   tationProxy.cxx file (Servers/ServerManager/), between line 100~117,
   there
   are some code specifically related to VolumeFixedPointRayCastMapper,
   do
   I
   need to change these codes too?
  
   Thanks,
  
   Biao
  
   On Thu, Feb 19, 2009 at 2:27 PM, Biao She sheb...@gmail.com wrote:
  
   I didn't add a new proxy definition for
   OpenGLVolumeTextureMapper3D.
   Instead, I change the definition for VolumeFixedPointRayCastMapper
   to
   something like that:
   SubProxy
Proxy name=VolumeFixedPointRayCastMapper
  proxygroup=mappers
  proxyname=OpenGLVolumeTextureMapper3D
/Proxy
 /SubProxy
   It didn't work.
   By now, I have tried to add a new proxy definition for
   OpenGLVolumeTextureMapper3D, but I got the same error message. The
   following is the XML proxy I wrote:
   SubProxy
   Proxy 

[Paraview] Mesh Subdivision

2009-02-20 Thread David Doria
I have a polydata (vtp) with a bunch of triangles. I want to smooth the
mesh. I tried the subdivide filter, but it produces absolutely ridiculous
triangles. So I thought this meant the connectivity information was wrong?
So I tried the TriangleStrips filter and then the subdivide filter, but now
the subdivide filter complains that there are no triangles. I tried
triangulate and then subdivide and I get the same mess as in the first case.

In all cases, the LoopSubdivision filter simply crashes. There is clearly
still something wrong with my understanding of these file formats and which
filters can be used on which types of files. Can anyone clarify this for me?

Thanks,

David
___
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