[Paraview] Registered texture images

2017-11-30 Thread postgurke
Hello,

 

I am using python scripts to import data into a ParaView (5.4.1) session. In order to keep the texture images in a saved state, I am registering them:

 


pathToTextureImage='path\\imagefile'
Display = Show(testvtp, renderView1)
Display.SetRepresentationType('Surface')
texProxy = servermanager.CreateProxy('textures','ImageTexture')
texProxy.GetProperty('FileName').SetElement(0, pathToTextureImage)
texProxy.UpdateVTKObjects()
servermanager.Register(texProxy, registrationName='ImageName')

 

Now, when I call this script multiple times (e.g. because I made changes to the vtp defining the texture plane), I will have multiple instances of my image in the pull-down menu for the texture. Is there a way to avoid this, either by checking if the resitrationName already exists or by deleting the multiple texture image from the list afterwards?

 

I have found this https://public.kitware.com/pipermail/paraview/2007-October/006126.html , but I cannot figure out how to use the code correctly in my case.

 

Also, is it possible to show only the images associated with the respective object in the pull-down menu? When I have many profiles with images loaded, the menu gets quite crowded and there is a risk of choosing an image not belonging to the current profile. 

 

Any suggestions on how to solve this are very much apprechiated. Thanks in advance!

Cheers,

Venke

 

 

 

 

___
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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] [EXTERNAL] Duplicate Layouts

2016-12-06 Thread postgurke
Hi Tobias

Thanks for your feedback. I will use your modifications the next time when I
need this.

rv1.ViewSize will hold the size of the first RenderView. But I think it doesn't
affect the size of the render window, only the view itself. Maybe this is still
helpful to you. I haven't done anything with more than two windows yet.

Cheers
Venke





> "Mondry, Tobias"  hat am 6. Dezember 2016 um 11:54
> geschrieben:
> 
> 
> Hi Venke,
> 
> thank you for your Script.
> I modified your Script a little. It is working for me, as long as I have only
> one view in the layout.
> When I have more than one view I can't reproduce the layout. It is possible to
> read and set the ViewSize. Is there a way to read and define the exact
> location of a view in a layout?
> 
> Here the modified script, in case it helps someone:
> 
> rv1=GetActiveView()
> ALL=GetSources()
> 
> dispProps=list()
> 
> for i in range(len(ALL.keys())):
> dispProps.append(GetDisplayProperties(ALL.values()[i]))
> 
> 
> viewLayout1 = GetLayout()
> #viewLayout1.SplitHorizontal(0, 0.5)
> 
> viewLayout2 = CreateLayout()
> 
> rv2=CreateView('RenderView')
> 
> SetActiveView(rv2)
> 
> propNameList=['Visibility', 'Color', 'LookupTable', 'DiffuseColor', 'Scale',
> 'Representation', 'Texture', 'Opacity','Origin','Position','ScaleFactor']
> 
> for j in range(len(ALL.keys())):
> 
> 
>
> SetDisplayProperties(ALL.values()[j],ColorArrayName=dispProps[j].ColorArrayName[1])
> for name in propNameList:
> try:
> eval('SetDisplayProperties(ALL.values()[j], ' + name + '
> =dispProps[j].' + name + ')')
> except:
> pass
> 
> 
> 
> ResetCamera()
> 
> Greetings
> Tobias
> 
> _
> Von: postgu...@web.de [postgu...@web.de]
> Gesendet: Donnerstag, 1. Dezember 2016 11:01
> An: Mondry, Tobias; Scott, W Alan; paraview@paraview.org
> Betreff: Re: [Paraview] [EXTERNAL] Duplicate Layouts
> 
> Hi Tobias
> 
> You could get the DisplayProperties of all your objects and then set them
> accordingly in the new render window using the Python Shell. I have written a
> short script for myself for this task --- however something is not quite
> correct, as strange colorings sometimes appear after turning the model in the
> second view. It can be fixed by making that object invisible and visible
> again,
> but still Maybe someone more experienced can correct my answer in that
> respect or has a better idea to tackle this problem...?
> 
> Here is my code:
> 
> rv1=GetActiveViewOrCreate('RenderView')
> ALL=GetSources()
> 
> dispProps=list()
> for i in range(len(ALL.keys())):
> dispProps.append(GetDisplayProperties(ALL.values()[i]))
> 
> viewLayout1 = GetLayout()
> viewLayout1.SplitHorizontal(0, 0.5)
> 
> rv2=CreateView('RenderView')
> viewLayout1.AssignView(2, rv2)
> 
> SetActiveView(rv2)
> 
> for j in range(len(ALL.keys())):
> 
>
> SetDisplayProperties(ALL.values()[j],Visibility=dispProps[j].Visibility)
> 
> SetDisplayProperties(ALL.values()[j],ColorArrayName=dispProps[j].ColorArrayName[1])
> 
>
> SetDisplayProperties(ALL.values()[j],LookupTable=dispProps[j].LookupTable)
> 
>
> SetDisplayProperties(ALL.values()[j],DiffuseColor=dispProps[j].DiffuseColor)
> SetDisplayProperties(ALL.values()[j],Scale=dispProps[j].Scale)
> 
> SetDisplayProperties(ALL.values()[j],Representation=dispProps[j].Representation)
> SetDisplayProperties(ALL.values()[j],Texture=dispProps[j].Texture)
> 
> 
> 
> Cheers
> Venke
> 
> 
> 
> > "Mondry, Tobias"  hat am 1. Dezember 2016 um 08:46
> > geschrieben:
> >
> >
> > Camera link is nice, but not what I want.
> >
> > Example:
> > - load a stl file
> > - make a clip and use red as solid color
> > - open a new view or layout
> >
> > Now it would be useful to have the same "image" in the new view or layout:
> > - the clip is in show
> > - the clipped geometry has the color red
> >
> > It's like a copy and paste of all settings of a view.
> >
> >
> > Tobias
> >
> > 
> > Von: Scott, W Alan [wasc...@sandia.gov]
> > Gesendet: Mittwoch, 30. November 2016 18:48
> > An: Mondry, Tobias; paraview@paraview.org
> > Betreff: RE: [EXTERNAL] [Paraview] Duplicate Layouts
> >
> > You mean link the cameras for two views?  Right click on the background,
> > then
> > left click in the other view.
> >
> > Alan
> >
> > From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of Mondry,
> > Tobias
> > Sent: Wednesday, November 30, 2016 8:39 AM
> > To: paraview@paraview.org
> > Subject: [EXTERNAL] [Paraview] Duplicate Layouts
> >
> > Hi,
> >
> > do you know a way to duplicate a Layout, in GUI or python?
> > This would be useful when you want to have different Layouts with slightly
> > different color bar settings, for example.
> >
> > Kind regards
> >
> > Tobias
> 
> 
> Pfinder KG
> Rudolf-Diesel-Strasse 14
> 71032 Böblingen / Germany
> Telefon: + 49 

Re: [Paraview] [EXTERNAL] Duplicate Layouts

2016-12-01 Thread postgurke
Hi Tobias

You could get the DisplayProperties of all your objects and then set them
accordingly in the new render window using the Python Shell. I have written a
short script for myself for this task --- however something is not quite
correct, as strange colorings sometimes appear after turning the model in the
second view. It can be fixed by making that object invisible and visible again,
but still Maybe someone more experienced can correct my answer in that
respect or has a better idea to tackle this problem...?

Here is my code:

rv1=GetActiveViewOrCreate('RenderView')
ALL=GetSources()

dispProps=list()
for i in range(len(ALL.keys())):
dispProps.append(GetDisplayProperties(ALL.values()[i]))

viewLayout1 = GetLayout()
viewLayout1.SplitHorizontal(0, 0.5)

rv2=CreateView('RenderView')
viewLayout1.AssignView(2, rv2)

SetActiveView(rv2)

for j in range(len(ALL.keys())):
SetDisplayProperties(ALL.values()[j],Visibility=dispProps[j].Visibility)

SetDisplayProperties(ALL.values()[j],ColorArrayName=dispProps[j].ColorArrayName[1])

SetDisplayProperties(ALL.values()[j],LookupTable=dispProps[j].LookupTable)

SetDisplayProperties(ALL.values()[j],DiffuseColor=dispProps[j].DiffuseColor)
SetDisplayProperties(ALL.values()[j],Scale=dispProps[j].Scale)

SetDisplayProperties(ALL.values()[j],Representation=dispProps[j].Representation)
SetDisplayProperties(ALL.values()[j],Texture=dispProps[j].Texture)



Cheers
Venke



> "Mondry, Tobias"  hat am 1. Dezember 2016 um 08:46
> geschrieben:
> 
> 
> Camera link is nice, but not what I want.
> 
> Example:
> - load a stl file
> - make a clip and use red as solid color
> - open a new view or layout
> 
> Now it would be useful to have the same "image" in the new view or layout:
> - the clip is in show
> - the clipped geometry has the color red
> 
> It's like a copy and paste of all settings of a view.
> 
> 
> Tobias
> 
> 
> Von: Scott, W Alan [wasc...@sandia.gov]
> Gesendet: Mittwoch, 30. November 2016 18:48
> An: Mondry, Tobias; paraview@paraview.org
> Betreff: RE: [EXTERNAL] [Paraview] Duplicate Layouts
> 
> You mean link the cameras for two views?  Right click on the background, then
> left click in the other view.
> 
> Alan
> 
> From: ParaView [mailto:paraview-boun...@paraview.org] On Behalf Of Mondry,
> Tobias
> Sent: Wednesday, November 30, 2016 8:39 AM
> To: paraview@paraview.org
> Subject: [EXTERNAL] [Paraview] Duplicate Layouts
> 
> Hi,
> 
> do you know a way to duplicate a Layout, in GUI or python?
> This would be useful when you want to have different Layouts with slightly
> different color bar settings, for example.
> 
> Kind regards
> 
> Tobias
> 
> 
> Pfinder KG
> Rudolf-Diesel-Strasse 14
> 71032 Böblingen / Germany
> Telefon: + 49 (7031) 27 01 0 / Telefax: + 49 (7031) 28 05 00 / Internet:
> www.pfinder.de
> Handelsregister: Amtsgericht Stuttgart, Registergericht HRA 240702
> 
> Diese E-Mail kann Betriebs- und Geschäftsgeheimnisse oder sonstige
> vertrauliche und /oder rechtlich geschützte Informationen enthalten. Sollten
> Sie diese eMail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des
> Inhalts, eine Vervielfältigung oder Weitergabe der eMail ausdrücklich
> untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die eMail. Der
> Absender hat alle erdenklichen Vorsichtsmaßnahmen getroffen, dass die Anlagen
> dieser eMail frei von Computerviren o.ä. sind. Gleichwohl schließen wir die
> Haftung für jeden Schaden aus, der durch Computerviren o.ä. verursacht wurde,
> soweit wir nicht vorsätzlich oder grob fahrlässig gehandelt haben. Wir raten
> Ihnen, dass Sie in jedem Fall Ihre eigene Virenprüfung vornehmen, bevor Sie
> die Anlagen öffnen. Vielen Dank !
> 
> The information contained in this email message may be confidential, and may
> also be the subject of legal professional privilege. If you are not the
> intended recipient, any use, interference with, disclosure or copying of this
> material is unauthorised and prohibited. Please inform us immediately and
> destroy the email. We have taken every reasonable precaution to ensure that
> any attachment to this email has been swept for viruses. However, we cannot
> accept liability for any damage sustained as a result of software viruses and
> would advise that you carry out your own virus checks before opening any
> attachment. Thank you for your cooperation !
> 
> 
> Pfinder KG
> Rudolf-Diesel-Strasse 14
> 71032 Böblingen / Germany
> Telefon: + 49 (7031) 27 01 0 / Telefax: + 49 (7031) 28 05 00 / Internet:
> www.pfinder.de
> Handelsregister: Amtsgericht Stuttgart, Registergericht HRA 240702
> 
> Diese E-Mail kann Betriebs- und Geschäftsgeheimnisse oder sonstige
> vertrauliche und /oder rechtlich geschützte Informationen enthalten. Sollten
> Sie diese eMail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme 

Re: [Paraview] Project polygon onto surface

2016-10-25 Thread postgurke
Adam,

Have you actually tried the filter? Because I think the output is exactly what
you're asking for: the "section" of the surface is the part of the surface where
the polyline is proceted onto it, hence a polyline with the regarding topography
values for the respective z coordinates.

Cheers
Venke



> Adam Dershowitz  hat am 25. Oktober 2016 um 17:29
> geschrieben:
> 
> 
> I don't think that will do it.  Because, I don't want to slice anything.
> I just want to show the boundaries on the 3D surface.  I want to project the
> polygon that marks the edges of a region, onto the 3D topography.  
> It seems that Slice Along Polyline uses a laser to cut a section of the
> surface, according to the instructions.  Instead I want to see each spot where
> the laser hits on the surface.  
> 
> 
> From: postgu...@web.de [postgu...@web.de]
> Sent: Tuesday, October 25, 2016 11:13 AM
> To: Adam Dershowitz; paraview@paraview.org
> Subject: Re: [Paraview] Project polygon onto surface
> 
> Hi Adam
> 
> I think the Slice Along Polyline Filter is what you need. Just select the data
> set and the poly line in the window popping up and then proceed in the
> properties section as usual.
> 
> Cheers
> Venke
> 
> 
> 
> > Adam Dershowitz  hat am 25. Oktober 2016 um 16:01
> > geschrieben:
> >
> >
> > Is there a way to project a 2D, or 3D polygon onto a surface.
> > Specifically I have some elevation data, that is displaying fine.  But the
> > data has a lot of vertical variation.  I have a polygon that represents the
> > boundaries of different regions.  So, the polygon is effectively 2D.
> >  Although, I can give it a 3D values as well.
> > The difficulty is that I can know the elevation of the corners, but the
> > lines
> > between those corners often drop "underground".
> > So I would like to project the 2D (or 3D) polygon region onto the 3D ground
> > elevation.
> > You can think of this as having a topo map and I want to show the lines
> > around
> > an individual piece of property.
> > Is there a filter that can do this?
> >
> > Thanks,
> >
> > --Adam
> >
> > ___
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html=DQICaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I=sMm99lDyK40nLEagq8PC0lEbloTvtFPCU5aOI3LyDaw=
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__paraview.org_Wiki_ParaView=DQICaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I=iD69Hj5cpbD6ykFT4IC2HpA0Sg7i0PZKI0Kvkkk-KA4=
> >
> > Search the list archives at:
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3DParaView=DQICaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I=wjB_o3N2yOaMlHQwkRubVtOQaONIFgjXLZgGkSCsfmk=
> >
> > Follow this link to subscribe/unsubscribe:
> > https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_paraview=DQICaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=vWssSXYtyX0Fwvwsvi4PGgQ70jWW8djJYXqUQvS2j3I=zor1PXNvekBliiJOtZ5T0cocWkfwUd4H6OxmHTvbCDk=
___
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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] View geotiff in Paraview?

2016-10-18 Thread postgurke
Maybe there is a way to achieve what you want for tiff - but I am not aware of
it.

Would it be suitable for you to convert your data to the Netcdf format? That you
can import and then use the warp by scalar filter to show the elevation. This is
what I usually do for topography data.

Cheers
Venke



> Adam Dershowitz  hat am 18. Oktober 2016 um 16:19
> geschrieben:
> 
> 
> I did figure out how to load the texture.  But, now I’m just seeing a solid
> color on the plane.  This is because the region is fairly flat, at a higher
> elevation, and the tiff contains elevation data anyway.  
> So, this doesn’t do the job.  I can’t seem to select Warp by Scalar from the
> texture map.  
> Any other suggestions?
> 
> -- Adam
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 10/18/16, 5:00 AM, "postgu...@web.de"  wrote:
> 
> >Hi Adam
> >
> >I usually make a vtp File with just a frame from the image coordinates. Then
> >I
> >can load the image as texture to the plane.
> >
> >Cheers
> >Venke
> >
> >
> >
> >> Adam Dershowitz  hat am 17. Oktober 2016 um 17:11
> >> geschrieben:
> >> 
> >> 
> >> I have a geotiff that I would like to view in preview.  I’m able to open
> >> it,
> >> and view it, but the problem is that the scale and origin are not correct.
> >>  It
> >> seems that preview is just opening it as a TIFF and is ignoring the origin,
> >> corners and pixel size in the geotiff.  The problem is that I want to
> >> overlay
> >> some other polygons that are in a known location, so this placement is
> >> important (and off by hundreds of thousands of meters.)
> >> Can paraview open a geotiff?  If not, is there an easy way to just offset
> >> and
> >> scale data in Paraview?  It seems like it can be done by manually adding a
> >> Transform filter and then forcing it to scale and translate as necessary.
> >>  Although getting it all lined up is not trivial.
> >> 
> >> Thanks,
> >> 
> >> 
> >> -- Adam
> >> 
> >> ___
> >> Powered by www.kitware.com
> >> 
> >> Visit other Kitware open-source projects at
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html=DQIFaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=j-vV04azxSGZe-9mQWNFQ8RXiqbk6qw78S3jJl3IyZE=yy-o7WM3pL2BUPF6CpTjbKH4LHER0UUOf5r7BLqMqKE=
> >> 
> >> 
> >> Please keep messages on-topic and check the ParaView Wiki at:
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__paraview.org_Wiki_ParaView=DQIFaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=j-vV04azxSGZe-9mQWNFQ8RXiqbk6qw78S3jJl3IyZE=yHRr7HXYEfFn8q8DzXJGEFYv5hK_xDIvrgo7pwNumBU=
> >> 
> >> 
> >> Search the list archives at:
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3DParaView=DQIFaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=j-vV04azxSGZe-9mQWNFQ8RXiqbk6qw78S3jJl3IyZE=HBu2hYG3reK9wTLYUX1NsRHQa__SI4AXSDEgDr2g5cI=
> >> 
> >> 
> >> Follow this link to subscribe/unsubscribe:
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_paraview=DQIFaQ=t0wRGL5ICVzH157W8C8Wew=5usL3OGqXabRLtSzGmh8YEvbco28TaiOmWcn6rCn8wM=j-vV04azxSGZe-9mQWNFQ8RXiqbk6qw78S3jJl3IyZE=9hv4td6FZ-iBaIt_2yrKtoSXhH_-StkdRtyVYpe_5Jo=
___
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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] View geotiff in Paraview?

2016-10-18 Thread postgurke
Hi Adam

I usually make a vtp File with just a frame from the image coordinates. Then I
can load the image as texture to the plane.

Cheers
Venke



> Adam Dershowitz  hat am 17. Oktober 2016 um 17:11
> geschrieben:
> 
> 
> I have a geotiff that I would like to view in preview.  I’m able to open it,
> and view it, but the problem is that the scale and origin are not correct.  It
> seems that preview is just opening it as a TIFF and is ignoring the origin,
> corners and pixel size in the geotiff.  The problem is that I want to overlay
> some other polygons that are in a known location, so this placement is
> important (and off by hundreds of thousands of meters.)
> Can paraview open a geotiff?  If not, is there an easy way to just offset and
> scale data in Paraview?  It seems like it can be done by manually adding a
> Transform filter and then forcing it to scale and translate as necessary.
>  Although getting it all lined up is not trivial.
> 
> Thanks,
> 
> 
> -- Adam
> 
> ___
> 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:
> http://public.kitware.com/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

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

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


Re: [Paraview] source name in python view

2016-10-13 Thread postgurke
Hi Felipe

Would GetSources(), maybe along with FindSource and SetActiveSource help you?
ALL=GetSources() gives you a dictionary of all sources in your session.

Cheers
Venke



> Felipe Bordeu  hat am 12. Oktober 2016 um 15:15
> geschrieben:
> 
> 
> I use python view to plot some data allons my 3D visualisation. Can I get
> the name of the source inside the 'python view script' so I can know to
> which source belongs each line on my plot?.
> (I know I can set the name of a source using  RenameSource('Good Result ')
> )
> 
> 
> Felipe
> ___
> 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:
> http://public.kitware.com/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

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

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


Re: [Paraview] Lock Data Range for multiple attributes

2016-09-15 Thread postgurke
Hello Mathieu

Thank you for your answer. Unfortunately I don't quite understand :(. I tried to
duplicate the first and last point of LUT.RGBPoints (which are initially correct
before I look at a different attribute and switch back) - but this does not do
the trick. Sorry, I am not used to reading from State-Files. Do you have a short
explanation what you did in either the Paraview python shell or GUI to achieve
this?

Cheers
Venke

 

> Mathieu Westphal  hat am 15. September 2016 um
> 10:46 geschrieben:
> 
> 
> Hello
> 
> There is an easy work around for this. Do not use the lock range feature,
> but add lookup table point on the data value you want to lock.
> See attached pvsm, locked data are RTData and Results.
> 
> 
> 
> 
> Mathieu Westphal
> 
> On Thu, Sep 15, 2016 at 9:44 AM,  wrote:
> 
> > Hello
> >
> > Does nobody have a solution for this, or am I missing something obvious?
> > The only thing I can do to fix the color ranges is separate the file into
> > multiple objects, but as one can only look at one at a time anyways (as
> > they are
> > at the same location, obviously) and our model already contains a lot of
> > objects, this is rather bothersome...
> >
> > Cheers
> > Venke
> >
> >
> >
> > > postgu...@web.de hat am 9. September 2016 um 09:52 geschrieben:
> > >
> > >
> > > Hello All
> > >
> > > Sorry to bother you again... I seem to miss something wanting to fix
> > color
> > > scale
> > > ranges for objects with multiple attributes.
> > > For example: I have a vtk-Plane with associated velocity and density
> > values
> > > that
> > > I can choose for coloring. When I imported the object, I set
> > > LUT.RescaleTransferFunction(min, max) and LUT.LockDataRange = 1 for both
> > > attributes (with different min,max, of course). In the GUI everything
> > looks
> > > fine
> > > at first, but when I switch the coloring from one attribute to another,
> > > ParaView
> > > seems to ignore the checked "Lock Data Range" but switches to some
> > Min/Max
> > > found
> > > in the data. Maybe I misunderstand the functionality of "Lock Data
> > Range"? Is
> > > this the expected behaviour? If yes, what could I do to really fix the
> > min,max
> > > to my own specification? (I also tried to use a preset color scale with
> > my
> > > desired min,max, but this does not change the behaviour either.)
> > >
> > > Thanks for your support and any ideas on this,
> > > Venke
> > > ___
> > > 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:
> > > http://public.kitware.com/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
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/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

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

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


Re: [Paraview] Lock Data Range for multiple attributes

2016-09-15 Thread postgurke
Hello

Does nobody have a solution for this, or am I missing something obvious? 
The only thing I can do to fix the color ranges is separate the file into
multiple objects, but as one can only look at one at a time anyways (as they are
at the same location, obviously) and our model already contains a lot of
objects, this is rather bothersome...

Cheers
Venke



> postgu...@web.de hat am 9. September 2016 um 09:52 geschrieben:
> 
> 
> Hello All
> 
> Sorry to bother you again... I seem to miss something wanting to fix color
> scale
> ranges for objects with multiple attributes. 
> For example: I have a vtk-Plane with associated velocity and density values
> that
> I can choose for coloring. When I imported the object, I set
> LUT.RescaleTransferFunction(min, max) and LUT.LockDataRange = 1 for both
> attributes (with different min,max, of course). In the GUI everything looks
> fine
> at first, but when I switch the coloring from one attribute to another,
> ParaView
> seems to ignore the checked "Lock Data Range" but switches to some Min/Max
> found
> in the data. Maybe I misunderstand the functionality of "Lock Data Range"? Is
> this the expected behaviour? If yes, what could I do to really fix the min,max
> to my own specification? (I also tried to use a preset color scale with my
> desired min,max, but this does not change the behaviour either.) 
> 
> Thanks for your support and any ideas on this,
> Venke
> ___
> 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:
> http://public.kitware.com/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

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

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


[Paraview] Lock Data Range for multiple attributes

2016-09-09 Thread postgurke
Hello All

Sorry to bother you again... I seem to miss something wanting to fix color scale
ranges for objects with multiple attributes. 
For example: I have a vtk-Plane with associated velocity and density values that
I can choose for coloring. When I imported the object, I set
LUT.RescaleTransferFunction(min, max) and LUT.LockDataRange = 1 for both
attributes (with different min,max, of course). In the GUI everything looks fine
at first, but when I switch the coloring from one attribute to another, ParaView
seems to ignore the checked "Lock Data Range" but switches to some Min/Max found
in the data. Maybe I misunderstand the functionality of "Lock Data Range"? Is
this the expected behaviour? If yes, what could I do to really fix the min,max
to my own specification? (I also tried to use a preset color scale with my
desired min,max, but this does not change the behaviour either.) 

Thanks for your support and any ideas on this,
Venke
___
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:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Import Preset color scale only if not already loaded

2016-09-08 Thread postgurke
... not just something like it, it is exactly the solution to my problem!
Thanks!! :)


> Utkarsh Ayachit  hat am 8. September 2016 um
> 13:29 geschrieben:
> 
> 
> Something like following should do the trick:
> 
> def HasPreset(name):
>  presets = servermanager.vtkSMTransferFunctionPresets()
>  for i in range(presets.GetNumberOfPresets()):
>  if presets.GetPresetName(i) == name:
>  return True
>  return False
> 
> 
> 
> On Thu, Sep 8, 2016 at 3:52 AM,   wrote:
> > Hello All
> >
> > I haven't been able to find a solution for this, so maybe someone can give
> > me a
> > hint...:
> > I am loading data via a python script into ParaView (5.0) and want to color
> > it
> > with a specific color scale. I can load this scale with the script and apply
> > the
> > coloring as desired but if the scale is already loaded, it will then be
> > loaded
> > twice (or more). What I would like to do is check if the scale is loaded and
> > if
> > yes apply it, if not first load and then apply.
> > I tought, that try/except would be my friend here, but applying a preset
> > that is
> > not loaded doesn't throw an error but uses the default Cool to Warm scale
> > instead... What is also somewhat strange: if I had the specific scale loaded
> > in
> > a ParaView session, but removed it from the list of presets, ParaView can
> > somehow remember it nonetheless and shows the data correctly (i.e. not with
> > the
> > Cool to Warm scale but the specific one).
> > Does somebody have an idea how I can avoid having the specific scale loaded
> > multiple times and still have the python script always producing the correct
> > visualization of the data set?
> >
> > Here is the code I was trying:
> > ...
> > zLUT=GetColorTransferFunction(ts)
> > try:
> > zLUT.ApplyPreset(colorname,False)
> > except:
> > ImportPresets(filename=colorname+'.json')
> > zLUT.ApplyPreset(colorname,False)
> > ...
> >
> >
> > Thank you very much!
> > Venke
> > ___
> > 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:
> > http://public.kitware.com/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

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

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


[Paraview] Import Preset color scale only if not already loaded

2016-09-08 Thread postgurke
Hello All

I haven't been able to find a solution for this, so maybe someone can give me a
hint...:
I am loading data via a python script into ParaView (5.0) and want to color it
with a specific color scale. I can load this scale with the script and apply the
coloring as desired but if the scale is already loaded, it will then be loaded
twice (or more). What I would like to do is check if the scale is loaded and if
yes apply it, if not first load and then apply.
I tought, that try/except would be my friend here, but applying a preset that is
not loaded doesn't throw an error but uses the default Cool to Warm scale
instead... What is also somewhat strange: if I had the specific scale loaded in
a ParaView session, but removed it from the list of presets, ParaView can
somehow remember it nonetheless and shows the data correctly (i.e. not with the
Cool to Warm scale but the specific one). 
Does somebody have an idea how I can avoid having the specific scale loaded
multiple times and still have the python script always producing the correct
visualization of the data set?

Here is the code I was trying:
...
zLUT=GetColorTransferFunction(ts)
try: 
zLUT.ApplyPreset(colorname,False)
except: 
ImportPresets(filename=colorname+'.json')
zLUT.ApplyPreset(colorname,False)
...


Thank you very much! 
Venke
___
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:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Opacity mapping and image texture in ParaView 5.1.2

2016-08-23 Thread postgurke
Hello

 

I have an issue regarding the "enable opacity mapping for surfaces" (in the Color Map Editor) if the ParaView session contains another object that has an image loaded as texture. The problem occurs in ParaView 5.1.2 but not in earlier versions (tested with 5.0.1. and 4.3.1). I am working on Windows 64bit.

 

If I want to enable the opacity mapping for surfaces everything works as expected as long as I have no texture image. The behaviour is very strange: if I load a texture image in another object, this seems to be set to the background with the transparent volume cutting a window to see this image. I will include snapshots because I think that my explanation may not be very clear. With no opacity mapping enabled I can see the volume and the plane with the image as expected.

 

Should I do anything differently in the new ParaView to achieve a transparent volume along with the image texture object or is this "just" a bug? Thank you very much and best regards

Venke

 

 ___
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:
http://public.kitware.com/mailman/listinfo/paraview