[Paraview] PythonProgrammableFilters Multiple Input Ports

2018-05-31 Thread Bane Sullivan
Hi there,

I see an old thread here:
https://paraview.markmail.org/thread/z7cy73444s7fjadk about setting
multiple input ports for python programmable filters but I cannot get this
to work.

I want to declare multiple input ports in a ServerManagerConfiguration XML
plugin but I have been unable to successfully add more than one input port
to the vtkPythonProgrammableFilter.

I see that in
`paraview/ParaViewCore/ClientServerCore/Core/vtkPythonProgrammableFilter.h`
the following is declared:

  /**
   * Set the number of input ports
   * This function is explicitly exposed to enable a
vtkClientServerInterpreter to call it
   */
  void SetNumberOfInputPorts(int numberOfInputPorts) VTK_OVERRIDE
  {
this->Superclass::SetNumberOfInputPorts(numberOfInputPorts);
  }


This leads me to believe that the functionality is there, but how exactly
would I set the number of input ports from an XML plugin for a Programmable
Filter? I have tried the following with no luck:


 
   ___
Powered by www.kitware.com

ParaView discussion is moving! Please visit https://discourse.paraview.org/ for 
future posts.

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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] test

2018-05-31 Thread Scott, W Alan via ParaView
test

:-)

Alan
___
Powered by www.kitware.com

ParaView discussion is moving! Please visit http://discourse.paraview.org/ for 
future posts.

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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] [EXTERNAL] Re: OSPRay textures and materials mapping

2018-05-31 Thread David E DeMarle
posted.


David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Thu, May 31, 2018 at 8:17 AM, David E DeMarle 
wrote:

> I'll remove the need for them at some point, but for 5.5 they are helpful.
> So yes discourse is a good place for safe keeping.
>
> On Wed, May 30, 2018, 8:53 PM Scott, W Alan  wrote:
>
>> Dave,
>>
>> Would this be a good set of scripts to put in our brand new, squeeky
>> clean Tips and Tricks section of Discourse?
>>
>>
>>
>> https://discourse.paraview.org/
>>
>>
>>
>> Alan
>>
>>
>>
>>
>>
>>
>>
>> *From:* ParaView [mailto:paraview-boun...@public.kitware.com] *On Behalf
>> Of *David E DeMarle
>> *Sent:* Tuesday, May 22, 2018 12:10 PM
>> *To:* Jonathan Borduas 
>> *Cc:* paraview@public.kitware.com
>> *Subject:* [EXTERNAL] Re: [Paraview] OSPRay textures and materials
>> mapping
>>
>>
>>
>> And here is a python schell script to make step 4 (create the
>> lookuptable) automatic.
>>
>>
>>
>> apartment = FindSource("sample_apartment.obj")
>>
>> vtklevel = apartment.GetClientSideObject()
>>
>> lut = GetColorTransferFunction('MaterialIds')
>>
>> arr = vtklevel.GetOutput().GetFieldData().GetAbstractArray(0)
>>
>> lut.InterpretValuesAsCategories = 1
>>
>> ll = []
>>
>> for x in range(0, arr.GetNumberOfTuples()):
>>
>> ll.append(str(x))
>>
>> ll.append(arr.GetValue(x))
>>
>>
>>
>>
>>
>>
>> David E DeMarle
>> Kitware, Inc.
>> Principal Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>>
>> On Tue, May 22, 2018 at 1:51 PM, David E DeMarle <
>> dave.dema...@kitware.com> wrote:
>>
>> On Tue, May 22, 2018 at 12:34 PM, David E DeMarle <
>> dave.dema...@kitware.com> wrote:
>>
>>
>>
>> On Tue, May 22, 2018 at 10:34 AM, Jonathan Borduas <
>> jonathan.bord...@caboma.com> wrote:
>>
>> Hi David,
>>
>> I was able to complete all the steps. As you probably know, the step four
>> was tedious.
>>
>> However I couldn’t get the result I wanted since I couldn’t assign the
>> right textures to the right areas. Is there a mechanism to assign the
>> texture just like we assign materials ?
>> I guess this is what you mean by “multi-texture isn’t implemented yet”. I
>> could probably extract all objects using a connectivity filter and then
>> manually assign the textures, but again it is a tedious process for complex
>> objects.
>>
>>
>>
>> Better to do it in the code. We read in all of the texture coordinates
>> when we read the .obj and all of the texture files when we read the .mtl ->
>> we just aren't using the right set of texture coordinates in all cases yet.
>> That is most of what I mean by multitexture.
>>
>>
>>
>> Is there a roadmap as to when the multi-texture could be implemented ?
>>
>>
>>
>> I'm hoping for 5.6 in a couple of months time. Although this is important
>> it may very well slip because of other priorities.
>>
>>
>>
>>
>>
>>
>> In the meantime, this python programmable filter is a workaround.
>>
>>
>>
>> pdi = self.GetInput()
>>
>> pdo = self.GetOutput()
>>
>> pdo.ShallowCopy(pdi)
>>
>>
>>
>> arraynames = []
>>
>> arrays = {}
>>
>> *for* a *in* range(0,pdi.GetPointData().GetNumberOfArrays()):
>>
>>   array = pdi.GetPointData().GetArray(a)
>>
>>   *if* array.GetNumberOfComponents() != 2:
>>
>> *continue*
>>
>>   arrname = array.GetName()
>>
>>   pdo.GetPointData().RemoveArray(arrname)
>>
>>   arraynames.append(arrname)
>>
>>   arrays[arrname] = array
>>
>>
>>
>> tcoords = vtk.vtkFloatArray()
>>
>> tcoords.SetName("TCoords")
>>
>> tcoords.SetNumberOfComponents(2)
>>
>> pdo.GetPointData().SetTCoords(tcoords)
>>
>> # todo numpy this to make it 100x faster
>>
>> *for* p *in* range(0, pdi.GetNumberOfPoints()):
>>
>>   tcoord = [0,0]
>>
>>   *for* arrname *in* arrays:
>>
>> candidate = arrays[arrname].GetTuple2(p)
>>
>> *if* candidate[0] == -1 *and* candidate[1] == -1:
>>
>>   *continue*
>>
>> tcoord = candidate
>>
>>   tcoords.InsertNextTuple2(tcoord[0],tcoord[1])
>>
>>
>>
>>
>>
>>
>>
>> It would be great to have readers that can load
>> texture/Geometry/Materials files such as .obj (.mtl and .png), .fbx and
>> .dwg.
>>
>>
>>
>> Agreed.
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Jonathan Borduas
>>
>>
>>
>> *From:* David E DeMarle 
>> *Sent:* Friday, May 18, 2018 10:58 AM
>> *To:* Jonathan Borduas 
>> *Cc:* paraview@public.kitware.com
>> *Subject:* Re: [Paraview] OSPRay textures and materials mapping
>>
>>
>>
>> Hi Jonathan.
>>
>>
>>
>> Yes you can do that.
>>
>>
>>
>> 1) File->Load OSPRay Materials, switch the file type from "OSPRay
>> Material Files (*.json)"  to "Wavefront Material FIles (*.mtl)". That will
>> let you load all of the materials and textures. They should all show up in
>> the Material list.
>>
>>
>>
>> 2) The OSPRay Material selection (on Display section of Properties Tab
>> advanced) will have all of the individual materials listed in it + a few
>> others including "Value Indexed" which is all the way at the bottom. Choose
>> that it means "use the categorical 

[Paraview] Find the intersection point between a connectivity and a stream tracer

2018-05-31 Thread Caffagni, Andrea
Dear Users,
I need to find the intersection point between a connectivity surface (portion 
of a slice) and a stream tracer that runs through this.
I have tried the IntersectFragments it doesn’t work with stream tracer.
Someone of you have some suggestions?
Best regards,
Andrea


_



Questo messaggio è da intendersi esclusivamente ad uso del destinatario e può 
contenere informazioni che sono di natura privilegiata, confidenziale o non 
divulgabile secondo le leggi vigenti. Se il lettore del presente messaggio non 
è il destinatario designato, o il dipendente/agente responsabile per la 
consegna del messaggio al destinatario designato, si informa che ogni 
disseminazione, distribuzione o copiatura di questa comunicazione è vietata 
anche ai sensi della normativa vigente in materia di protezione dei dati 
personali. Se avete ricevuto questo messaggio per errore, vi preghiamo di 
notificarcelo immediatamente a mezzo e-mail di risposta e successivamente di 
procedere alla cancellazione di questa e-mail e relativi allegati dal vostro 
sistema.

_



This message is intended only for the use of the addressee and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If the reader of this message is not the intended recipient, or 
the employee or agent responsible for delivering the message to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is prohibited under the applicable data 
protection law. If you have received this e-mail by mistake, please notify us 
immediately by return e-mail and delete this e-mail and all attachments from 
your system.



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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview


[Paraview] BaseOffset use

2018-05-31 Thread paul . carrico
Dear All 

I'm trying to implement "BaseOffset" in my models in order to strat
numbering from 1 rather than 0, but Paraview crashes whatever is the
reader I use (xmf or xmf3): Am I doing something wrong? 

Thanks 

Paul 











0. 0. 0.
1. 0. 0.
1. 1. 0.
0. 1. 0.




5 1 2 3 4




0. 0. 0.
1.11 0. 0.
1.12 1.12 0.
0. 1.13 0.






___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/paraview