[Paraview] Show custom cube axes annotations

Sebastien Jourdain sebastien.jourdain at kitware.com
Sun Nov 18 09:48:24 EST 2012


Hi Felipe,

Lets state what we know.
U,V and W are 3 unit vectors that describe which axis should be used by the
cube axis.
OrientedBounds are 6 values describing the bounds of the data using the U,V
and W vectors. [minU, maxU, minV, maxV, minW, maxW]

Then to solve your problem you will have to do the following:

1) Compute Pmin and Pmax as follow

Pmin = U.OrientedBounds[0] + V.OrientedBouds[2] + W.OrientedBouds[4]
Pmax = U.OrientedBounds[1] + V.OrientedBouds[3] + W.OrientedBouds[5]

2) Apply your transform (Rotation, Scale, Translation) to those 2 points

You get P'min and P'max

3) Apply the rotation ONLY to U,V and W (as translation/scale have no
effect on a unit vector)

You get U', V' and W'

4) You resolve the equations

P'min = U'.a + V'.b + W'.c
P'max = U'.d + V'.e + W'.f

And then you get OrientedBounds' = [a,d,b,e,c,f]

And you're done... Do you need anything more ?

Seb


On Fri, Nov 16, 2012 at 6:27 PM, Felipe Bordeu Weldt <
felipe.bordeu at ec-nantes.fr> wrote:

> Ok,
>
> My idea is simple (http://www.paraview.org/Bug/view.php?id=13583).
> We visualizes data with non convectional axes, so we put that information
> (name and units) in the labels. Also we want to be able to use the
> transformation filter to modified the meshes, and we want the axis and
> labels to follow the transformation. So I'm writing a filter
> (vtkTransformWithAxis) that apply the transform to the mesh and to all the
> data that is used for the cube axis.
>
> But I'm not able create correctly the OrientedBoundingBox and the three
> vectors to generate the Non Orthogonal Bounding Box.
>
> So if the input does not have all the data for the axis, it will generate
> the data (vector, OriendedBoundigBox... and so on ) , and then apply the
> transformation filter.
>
> Is that clearer?
>
> Thanks for you time so far.
> Felipe
>
> Le 16 nov. 12 à 19:33, Sebastien Jourdain a écrit :
>
> Hi Felipe,
>
> could you rephrase your question, as I'm not sure to follow you anymore.
> Specially what are the piece of informations that are still missing to you.
>
> Thanks,
>
> Seb
>
>
> On Fri, Nov 16, 2012 at 1:13 PM, Felipe Bordeu <felipebordeu at gmail.com>wrote:
>
>>  I have no problem with the use custom range.
>>
>> My problem is than I use a home made transform filter to transform my
>> data, our data is sometimes degenerated (one axis is very very small), so
>> we use the transform filter to increase the size of that dimensions. But
>> the problems is that the cube axes does not have the good units any more (
>> so we want to keep the labels of the input by applying the same transform)
>>
>> Until now I can apply only translation and scale, not rotation.
>>
>> note: in the images the little arrow is the original one.
>>
>> <bhfgfhca.png>
>> <ddgjfefc.png>
>>
>>
>> Felipe
>>
>> Le 16/11/2012 17:47, Sebastien Jourdain a écrit :
>>
>> Oops,
>>
>>  the "Use Custom Range" will use the text field property but this will
>> add extra information so when you use the QuadView, the QuadView will be
>> able to know what the slices origin is regarding those arbitrary bounds.
>>
>>  Hope that makes a little bit more sense,
>>
>>  Seb
>>
>>
>> On Fri, Nov 16, 2012 at 11:42 AM, Sebastien Jourdain <
>> sebastien.jourdain at kitware.com> wrote:
>>
>>> Hi Felipe,
>>>
>>>  if you check "Use Custom Range" the cube axis will use the oriented
>>> bounds correctly for the labels instead of using the world space coordinate
>>> bounds.
>>> This happen by adding new field data providing the min/max for each axis
>>> that should be used for the labels.
>>>
>>>  Regarding you question the end points of the cube axes will be
>>>
>>>  Pmin = U*OrientedBounds[0] + V*OrientedBouds[2] + W*OrientedBouds[4]
>>>  ...
>>>  Pmax = U*OrientedBounds[1] + V*OrientedBouds[3] + W*OrientedBouds[5]
>>>
>>>  Hope that help,
>>>
>>>  Seb
>>>
>>>
>>>
>>>  On Fri, Nov 16, 2012 at 10:02 AM, Felipe Bordeu <
>>> felipe.bordeu at ec-nantes.fr> wrote:
>>>
>>>>   Hi,
>>>>
>>>> I am trying  to understand how the new annotation for the cube axis
>>>> works.
>>>>
>>>> I don't understand how to define the OrientedBoundingBox FieldData
>>>> variable. (I understand the c++ part, that’s easy ;) )
>>>> (I'm working with a c++ reader plugin).
>>>>
>>>> What is the relation between the Oriented Bound and the scale and the
>>>> position of the axis.
>>>> <mime-attachment.png>
>>>>
>>>>     Thanks
>>>>
>>>>     Felipe
>>>>
>>>>
>>>>
>>>>     ps: Paraview 3.98.0-RC2 git version, kubuntu 12.04 64.
>>>>
>>>> --
>>>>
>>>> Felipe Bordeu Weldt
>>>> Ingénieur de Recherche
>>>> -------------------------------------
>>>> Tél. : 33 (0)2 40 37 16 57
>>>> Fax. : 33 (0)2 40 74 74 06Felipe.Bordeu at ec-nantes.fr
>>>> Institut GeM - UMR CNRS 6183
>>>> École Centrale Nantes
>>>> 1 Rue de La Noë, 44321 Nantes, FRANCE
>>>> -------------------------------------
>>>>
>>>>
>>>>  _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>
>>
>> --
>> Felipe Bordeu Weldt
>> Felipe Bordeu Weldt
>> Ingénieur de Recherche
>> -------------------------------------
>> Tél. : 33 (0)2 40 37 16 57
>> Fax. : 33 (0)2 40 74 74 06
>> Felipe.Bordeu at ec-nantes.fr
>> Institut GeM - UMR CNRS 6183
>> École Centrale Nantes
>> 1 Rue de La Noë, 44321 Nantes, FRANCE
>> -------------------------------------
>>
>>
>
>
> _______________________________________________
> 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/20121118/13e388d6/attachment.htm>


More information about the ParaView mailing list