[Paraview] ParaView Digest, Vol 59, Issue 77

David Doria daviddoria at gmail.com
Mon Mar 30 10:40:08 EDT 2009


Eric, you were right - I ran clean and that made each point appear to only
have one normal. However, as you said, they still aren't all on the same
side of the surface. Is there no way to make them all point "out"?

Thanks,

David


On Mon, Mar 30, 2009 at 9:27 AM, <paraview-request at paraview.org> wrote:

> Send ParaView mailing list submissions to
>        paraview at paraview.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://www.paraview.org/mailman/listinfo/paraview
> or, via email, send a message with subject or body 'help' to
>        paraview-request at paraview.org
>
> You can reach the person managing the list at
>        paraview-owner at paraview.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ParaView digest..."
>
>
> Today's Topics:
>
>   1. Re: Readers and multiple arrays (Utkarsh Ayachit)
>   2. Re: Orienting Normals? (Utkarsh Ayachit)
>   3. Re: Orienting Normals? (Eric E. Monson)
>   4. Re: Question about writing custom reader for paraview
>      (Moreland, Kenneth)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 30 Mar 2009 09:13:45 -0400
> From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> Subject: Re: [Paraview] Readers and multiple arrays
> To: Thorsten Hater <th at tp1.rub.de>
> Cc: "paraView at paraview.org" <paraView at paraview.org>
> Message-ID:
>        <7ba9d6a30903300613w5d904b4j1843af70ed887b5c at mail.gmail.com>
> Content-Type: text/plain; charset=windows-1252
>
> The signature should me more like:
>
> vtkGetVector2Macro(StartThetaRange, double);
>
> with:
> double StartThetaRange[2];
>
> Utkarsh
>
>
> On Mon, Mar 30, 2009 at 5:51 AM, Thorsten Hater <th at tp1.rub.de> wrote:
> > Hi,
> >
> > ok, this is what wanted to now. I suppose this implies, that my
> > plugin has to expose a member function of the signature
> >
> > void GetThetaStartRange(int lower, int upper);
> >
> > and sets its arguments to the correct values.
> >
> > ? Thorsten
> >
> > Utkarsh Ayachit schrieb:
> >>
> >> Here's a snippet of the XML that makes it possible for a domain to
> >> depend on an information property whose values are obtained from ?the
> >> server.
> >>
> >> ? ? ?<DoubleVectorProperty name="StartThetaInfo"
> >> ? ? ? ?command="GetStartThetaRange"
> >> ? ? ? ?information_only="1"
> >> ? ? ? ?number_of_elements="2"
> >> ? ? ? ?default_values="1 1024">
> >> ? ? ? <SimpleDoubleInformationHelper />
> >> ? ? ?</DoubleVectorProperty>
> >>
> >> ? ? ?<DoubleVectorProperty
> >> ? ? ? ? name="StartTheta"
> >> ? ? ? ? command="SetStartTheta"
> >> ? ? ? ? information_property="StartThetaInfo"
> >> ? ? ? ? number_of_elements="1"
> >> ? ? ? ? animateable="1"
> >> ? ? ? ? default_values="0" >
> >> ? ? ? ?<DoubleRangeDomain name="range" >
> >> ? ? ? ? ?<RequiredProperties>
> >> ? ? ? ? ? ? ?<Property name="StartThetaInfo" function="RangeInfo"/>
> >> ? ? ? ? ?</RequiredProperties>
> >> ? ? ? ?</DoubleRangeDomain>
> >> ? ? ?</DoubleVectorProperty>
> >>
> >> The key is to merely refer to the information property as
> >> "RequiredProperties" for the domain.
> >>
> >> Utkarsh
> >>
> >> On Thu, Mar 26, 2009 at 2:31 PM, Moreland, Kenneth <kmorel at sandia.gov>
> >> wrote:
> >>
> >>>
> >>> Utkarsh,
> >>>
> >>> You?re the expert on server manager XML. ?Can you explain how to set a
> >>> range
> >>> domain that depends on something else (like an information property)?
> >>>
> >>> -Ken
> >>>
> >>>
> >>> On 3/23/09 9:23 AM, "Thorsten Hater" <th at tp1.rub.de> wrote:
> >>>
> >>> Thanks a lot, my plugin is working quite nice.
> >>> One question remains: how do I get the GUI to
> >>> take non-default values for Sliders for example?
> >>> More concrete: I have got a file on disk, parsed
> >>> its metainfo and now I want to put some of it
> >>> in the GUI to allow subdomain selection.
> >>> The paraview book mentions the SimpleInformationHelper
> >>> but does neither explain how it used nor how specific
> >>> variables are set with it, for example Slider min-max...
> >>>
> >>> Thorsten
> >>>
> >>> Moreland, Kenneth wrote:
> >>>
> >>>>
> >>>> In your reader class method that sets which variables to load, is it
> >>>> calling this->Modified. ?If Modified is not called, then the pipeline
> >>>> will not know that something has changed for your reader and it will
> >>>> not request a new read.
> >>>>
> >>>> -Ken
> >>>>
> >>>>
> >>>> On 3/17/09 3:20 AM, "Thorsten Hater" <th at tp1.rub.de> wrote:
> >>>>
> >>>> ? ?Hello again,
> >>>>
> >>>> ? ?solved this problem. But encountered a new minor one,
> >>>> ? ?which is to dynamically reread the file if the GUI elements
> >>>> ? ?change, for example, if some more arrays are select.
> >>>> ? ?Could anybody point me where to start?
> >>>> ? ?I guess that there is some kind of onUpdata callback,
> >>>> ? ?but how is it called exactly and how is it used?
> >>>>
> >>>> ? ?Best regards,
> >>>> ? ? ? ?Thorsten
> >>>>
> >>>> ? ?Thorsten Hater wrote:
> >>>> ? ?> Hi,
> >>>> ? ?>
> >>>> ? ?> could anybody give me some information on the problem of
> >>>> ? ?> adding multiple arrays to a single output of a reader.
> >>>> ? ?> Managing and displaying the array names GUI-wise is not
> >>>> ? ?> problematic, but rather where to put the data arrays in the
> >>>> ? ?> RequestData member.
> >>>> ? ?>
> >>>> ? ?> Best regards,
> >>>> ? ?> ? ?Thorsten
> >>>> ? ?> _______________________________________________
> >>>> ? ?> 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
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> ? **** ? ? ?Kenneth Moreland
> >>>> ? ?*** ? ? ?Sandia National Laboratories
> >>>> ***********
> >>>> *** *** *** ?email: kmorel at sandia.gov
> >>>> ** ?*** ?** ?phone: (505) 844-8919
> >>>> ? ?*** ? ? ?web: ? http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
> >>>> <http://www.cs.unm.edu/%7Ekmorel>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> ? **** ? ? ?Kenneth Moreland
> >>> ? ?*** ? ? ?Sandia National Laboratories
> >>> ***********
> >>> *** *** *** ?email: kmorel at sandia.gov
> >>> ** ?*** ?** ?phone: (505) 844-8919
> >>> ? ?*** ? ? ?web: ? http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
> >>>
> >>>
> >>>
> >
> >
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 30 Mar 2009 09:16:25 -0400
> From: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
> Subject: Re: [Paraview] Orienting Normals?
> To: David Doria <daviddoria at gmail.com>
> Cc: ParaView <paraview at paraview.org>
> Message-ID:
>        <7ba9d6a30903300616r29a9dfadl2603b626f03bff6d at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Have you tried applying "Normal Glyphs" filter? I am not sure if that
> filter is available in 3.4, but it is in the CVS version.
>
> Utkarsh
>
> 2009/3/29 David Doria <daviddoria at gmail.com>:
> > Is there anyway to get normals on only 1 side of this surface?
> > http://engineeringnotes.net/Scene.vtp
> >
> > If you glyph the normals, you'll see they point in both directions. I
> tried
> > all of the options in "extract surface normals", but none of them did it.
> >
> > 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
> >
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 30 Mar 2009 09:17:36 -0400
> From: "Eric E. Monson" <emonson at cs.duke.edu>
> Subject: Re: [Paraview] Orienting Normals?
> To: David Doria <daviddoria at gmail.com>
> Cc: ParaView <paraview at paraview.org>
> Message-ID: <F85937AA-C525-48CB-AAD2-208F70EB5879 at cs.duke.edu>
> Content-Type: text/plain; charset="us-ascii"; Format="flowed";
>        DelSp="yes"
>
> Hey David,
>
> Are you sure you don't have a bunch of duplicate points? If you run
> the "Clean" (vtkCleanPolyData) filter to merge coincident points, it
> looks more like there are only normals on one side or the other for
> each point (but they're not all on the same side of the surface).
>
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
>
>
> On Mar 29, 2009, at 4:01 PM, David Doria wrote:
>
> > Is there anyway to get normals on only 1 side of this surface?
> > http://engineeringnotes.net/Scene.vtp
> >
> > If you glyph the normals, you'll see they point in both directions.
> > I tried all of the options in "extract surface normals", but none of
> > them did it.
> >
> > 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
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.paraview.org/pipermail/paraview/attachments/20090330/a58ced71/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 4
> Date: Mon, 30 Mar 2009 07:27:23 -0600
> From: "Moreland, Kenneth" <kmorel at sandia.gov>
> Subject: Re: [Paraview] Question about writing custom reader for
>        paraview
> To: shenyanwen <shenyanwen at gmail.com>
> Cc: ParaView <paraview at paraview.org>
> Message-ID: <C5F624DB.777F%kmorel at sandia.gov<C5F624DB.777F%25kmorel at sandia.gov>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> InsertNextValue will work just fine so long as you are careful about
> inserting all the components for each tuple.  Most of the time I would
> recommend using InsertNextTupleValue instead.  However, in either case
> before filling the array I recommend calling Allocate first so that the
> memory will already be allocated.  This will make InsertNextValue more
> efficient because it will not have to reallocate the array.  Alternatively,
> you can call SetNumberOfComponents and then SetNumberOfTuples and then call
> SetTupleValue.  The choice between the two approaches is based on how you
> are using them and your own coding style.
>
> -Ken
>
> On 3/26/09 7:49 PM, "shenyanwen" <shenyanwen at gmail.com> wrote:
>
> Thank you !
> As you described, I can add more than one type of scalars by
> AddArray(type_name), and the ParaView will distinguish them by
> the names I set to them. I've got it.
> There is one more question. I use pressure->InsertNextValue(pressure[idx])
> to add saclar value to each point . I do not know whether this method is
> right or there is another method to add the scalar value to each point !
> Thanks so much!
>
> -Seven
>
>
> 2009/3/27 Moreland, Kenneth <kmorel at sandia.gov>
> You can add more fields by simply adding them to the point data of the
> output data object.
>
>  output->GetPointData()->AddArray(pressure);
>
> Make sure that you set a name for the arrays (using the SetName method of
> vtkDataArray).  That is how ParaView/VTK differentiates the fields.
>
> -Ken
>
>
>
> On 3/23/09 12:40 AM, "shenyanwen" <shenyanwen at gmail.com <http://shenyanwen
> @gmail.com> > wrote:
>
> Hi, thanks so much for your help!
> I have changed my code just like what you said.
> Now, I should add more than one type scalar like pressure, vol1, vol2, vol3
> and so on.
> So, how can I add these scalars into my output Data?
> I have already read these scalars into some variables like
> m_pressure[numPts], m_vol1[numPts],m_vol[numPts] and m_vol3[numPts], and how
> can I add these variables into my output Data?
> Thanks so much!
>
> --Seven
>
> 2009/3/20 Moreland, Kenneth <kmorel at sandia.gov <http://kmorel@sandia.gov>
> >
> What you are using is not quite right.  First, it sounds like you really
> want to create a vtkImageData.  This data holds a 1D, 2D, or 3D grid of
> points with origin and uniform spacing on each axis.  Thus, you would
> inherit from vtkImageAlgorithm and cast your output to vtkImageData.
>
> Second, the only thing you directly set in the output information is the
> WHOLE_EXTENT().  You do this in RequestInformation so that the downstream
> pipeline can make decisions about what to load before the data is actually
> loaded.  So, the first line you have below is correct, assuming you put it
> in RequestInformation.
>
> Now, you don't set UPDATE_EXTENT, you get it.  Someone downstream will set
> this the region of data in which it wants you to load.  You don't actually
> have to get this directly from the output information; you can get it from
> the output object.  So in RequestData, you would have code like this:
>
>  vtkImageData *output = vtkImageData::GetData(outInfo);
>  int *extent = output->GetUpdateExtent();
>
> Now you can set the actual extent, spacing, origin, and data itself
> directly into the data object.
>
>  output->SetExtent(extent);
>  output->SetOrigin(origin);
>  output->SetSpacing(ar);
>
> You can then set the data either by allocating and getting scalar data
> through the vtkImageData or by adding data to the image data's point data
> structure (retrieved with GetPointData()).  More details are in The VTK
> User's Guide.
>
> -Ken
>
>
>
> On 3/19/09 1:08 AM, "shenyanwen" <shenyanwen at gmail.com <http://shenyanwen@
> gmail.com>  <http://shenyanwen@gmail.com> > wrote:
>
>
>
>
>
> Hi, I am writing a custom reader for paraview to read my own data file
> which paraview hasn't have.
> I have known that the most important method is RequestInformation and
> RequestData, and I just want to write a reader that can output the data type
> of StructuredPoints with Scalar and some vectors.I have already use :
> outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
>                 0,dim[1]-1,0,dim[1]-1,0,dim[2]-1);
>    outInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),
>                 0,dim[1]-1,0,dim[1]-1,0,dim[2]-1);
> and:outInfo->Set(vtkDataObject::SPACING(), ar, 3);
> outInfo->Set(vtkDataObject::ORIGIN(), origin, 3);
> and how can I read the scalar data just like the file-format describes:
> SCALAR dataName dataType numComp
> LOOKUP_TABLE tableName
> s0
> s1
> s2
> ...
> s(n-1)
>
> which method or function can I use to read the s0,s1,...,s(n-1) into the
> variable and set to the outInfo.
> Thanks so much!
>
>
>
>
>
>   ****      Kenneth Moreland
>    ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov <http://kmorel@sandia.gov>  <
> http://kmorel@sandia.gov>
> **  ***  **  phone: (505) 844-8919
>    ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel><
> http://www.cs.unm.edu/%7Ekmorel>  <http://www.cs.unm.edu/%7Ekmorel>
>
>
>
>
>
>   ****      Kenneth Moreland
>    ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov <http://kmorel@sandia.gov>
> **  ***  **  phone: (505) 844-8919
>    ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel><
> http://www.cs.unm.edu/%7Ekmorel>
>
>
>
>
>
>   ****      Kenneth Moreland
>    ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>    ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://www.paraview.org/pipermail/paraview/attachments/20090330/3e91b28b/attachment.htm
> >
>
> ------------------------------
>
> _______________________________________________
> 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
>
>
> End of ParaView Digest, Vol 59, Issue 77
> ****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090330/43e0449d/attachment-0001.htm>


More information about the ParaView mailing list