[vtkusers] vtkusers Digest, Vol 115, Issue 22

chennian2013713 at gmail.com chennian2013713 at gmail.com
Sun Nov 17 09:38:11 EST 2013


Hi:


   I have a problem now.
    I just tried to fit surface from discrete points by using class
    "vtkSurfaceReconstructionFilter" at first, but I found that the surface
    which I fitted always departures from the points I set before. 
     I just would like that the points are on the surface , but they departure
    from each other.
    What should I do?
    Thanks.
Tom

发自 Windows 邮件



发件人: vtkusers-request at vtk.org
发送时间: ‎2013‎年‎11‎月‎16‎日, ‎星期六 ‎1‎:‎00
收件人: vtkusers at vtk.org

Send vtkusers mailing list submissions to
 vtkusers at vtk.org

To subscribe or unsubscribe via the World Wide Web, visit
 http://www.vtk.org/mailman/listinfo/vtkusers
or, via email, send a message with subject or body 'help' to
 vtkusers-request at vtk.org

You can reach the person managing the list at
 vtkusers-owner at vtk.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vtkusers digest..."


Today's Topics:

   1. Re: VTK on Xeon Phi (Santiago Alonso P?rez Rubiano)
   2. Re: VTK on Xeon Phi (David Gobbi)
   3. Re: VTK on Xeon Phi (Santiago Alonso P?rez Rubiano)
   4. Re: vtkInteractorStyleTrackballCamera: panning gets heavy
      then goes into reverse (Aashish Chaudhary)
   5. Re: vtkExodusIIReader/Writer examples in Python
      (Andrew.Wilkins at csiro.au)
   6. Issue: Contour shows on hole point rather than field point
      (Chao Liang)
   7. Volume extraction (Massinissa Bandou)
   8. Pixel Value on Mouse Over with java (amal jerbi)
   9. Re: Volume extraction (D?enan Zuki?)
  10. Re: Depth sorter question (Biddiscombe, John A.)
  11. Re: Pixel Value on Mouse Over with java (David Doria)
  12. Re: vtkExodusIIReader/Writer examples in Python (David Thompson)
  13. Surface Mesh of Equilateral Triangles (Harold)


----------------------------------------------------------------------

Message: 1
Date: Thu, 14 Nov 2013 18:38:29 -0500
From: Santiago Alonso P?rez Rubiano <srubiano at purdue.edu>
Subject: Re: [vtkusers] VTK on Xeon Phi
To: David E DeMarle <dave.demarle at kitware.com>
Cc: VTK Users <vtkusers at vtk.org>, Berk Geveci
 <berk.geveci at kitware.com>
Message-ID:
 <CAMbvBhgNgnnV79q4SX2MsN3kymKBguQmT9G+i4SQSSRa-LFvZw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Unfortunately I don't have good news on this. I'm trying to cross-compile
libMesa with offscreen support but at some point the compilation fails
because of some unsupported assembler instructions on Xeon Phi's intel
compiler. I have reported this on Intel forum (
http://software.intel.com/en-us/forums/topic/489151) and Mesa's mailing
list (
http://lists.freedesktop.org/archives/mesa-users/2013-November/000704.html)
and keep working on this.


On Wed, Nov 13, 2013 at 9:48 AM, David E DeMarle
<dave.demarle at kitware.com>wrote:

> As Berk said we haven't tried the Xeon Phi yet.
>
> VTK does work with OSMesa, See the pure offscreen rendering section of
> http://paraview.org/Wiki/ParaView/Users_Guide/Parallel_Rendering
> for CMake options to try first.
>
> To find out how to configure Mesa for the Phi first ask the Mesa mailing
> list. On the off chance they can't help, see ParaViewSuperbuild. Here we
> take Mesa 7.6.1 (old habits are hard to break) and configure it to cross
> compile on Cray's and Blue Gene's. There may be some patterns you could
> follow there that might help configure it for the Phi.
>
> Let us know how it goes. I would like to see this working.
>
>
>
>
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
> On Wed, Nov 13, 2013 at 9:38 AM, Berk Geveci <berk.geveci at kitware.com>wrote:
>
>> Hi Santiago,
>>
>> I am very glad that you are working on this. Please let us know how
>> things work out. Also, check out my recent post about support for shared
>> memory parallelism.
>>
>> Unfortunately, I don't think that anyone at Kitware has tried building
>> the whole thing on Xeon Phi so we probably won't be able to help.
>>
>> Best,
>> -berk
>>
>>
>> On Tue, Nov 12, 2013 at 10:36 PM, Santiago Alonso P?rez Rubiano <
>> srubiano at purdue.edu> wrote:
>>
>>> Has anyone tried (or succeeded at) cross-compiling VTK for Xeon Phi. Is
>>> it possible to run VTK using only OSMesa?
>>>
>>> I'm trying to compile libMesa 9.2.2 on the Xeon Phi but I'm having
>>> problems configuring the compilation. Has anyone tried something similar?
>>>
>>> _______________________________________________
>>> 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 VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>> _______________________________________________
>> 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 VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131114/e5e2e404/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 14 Nov 2013 16:50:48 -0700
From: David Gobbi <david.gobbi at gmail.com>
Subject: Re: [vtkusers] VTK on Xeon Phi
To: Santiago Alonso P?rez Rubiano <srubiano at purdue.edu>, VTK Users
 <vtkusers at vtk.org>
Message-ID:
 <CANwS1=GJVBCXMG7-ggKChMaRAwjoRyUffWGM=jq03YLOsdA-zw at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Have you tried an older version of Mesa?  For example, Mesa 7.7.1?
I've often found Mesa to be difficult to compile, but the Mesa 7
series seemed to be easier to work with than anything that came
before or after.

On Thu, Nov 14, 2013 at 4:38 PM, Santiago Alonso P?rez Rubiano
<srubiano at purdue.edu> wrote:
> Unfortunately I don't have good news on this. I'm trying to cross-compile
> libMesa with offscreen support but at some point the compilation fails
> because of some unsupported assembler instructions on Xeon Phi's intel
> compiler. I have reported this on Intel forum
> (http://software.intel.com/en-us/forums/topic/489151) and Mesa's mailing
> list
> (http://lists.freedesktop.org/archives/mesa-users/2013-November/000704.html)
> and keep working on this.
>
>
> On Wed, Nov 13, 2013 at 9:48 AM, David E DeMarle <dave.demarle at kitware.com>
> wrote:
>>
>> As Berk said we haven't tried the Xeon Phi yet.
>>
>> VTK does work with OSMesa, See the pure offscreen rendering section of
>> http://paraview.org/Wiki/ParaView/Users_Guide/Parallel_Rendering
>> for CMake options to try first.
>>
>> To find out how to configure Mesa for the Phi first ask the Mesa mailing
>> list. On the off chance they can't help, see ParaViewSuperbuild. Here we
>> take Mesa 7.6.1 (old habits are hard to break) and configure it to cross
>> compile on Cray's and Blue Gene's. There may be some patterns you could
>> follow there that might help configure it for the Phi.
>>
>> Let us know how it goes. I would like to see this working.
>>
>>
>>
>>
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>> On Wed, Nov 13, 2013 at 9:38 AM, Berk Geveci <berk.geveci at kitware.com>
>> wrote:
>>>
>>> Hi Santiago,
>>>
>>> I am very glad that you are working on this. Please let us know how
>>> things work out. Also, check out my recent post about support for shared
>>> memory parallelism.
>>>
>>> Unfortunately, I don't think that anyone at Kitware has tried building
>>> the whole thing on Xeon Phi so we probably won't be able to help.
>>>
>>> Best,
>>> -berk
>>>
>>>
>>> On Tue, Nov 12, 2013 at 10:36 PM, Santiago Alonso P?rez Rubiano
>>> <srubiano at purdue.edu> wrote:
>>>>
>>>> Has anyone tried (or succeeded at) cross-compiling VTK for Xeon Phi. Is
>>>> it possible to run VTK using only OSMesa?
>>>>
>>>> I'm trying to compile libMesa 9.2.2 on the Xeon Phi but I'm having
>>>> problems configuring the compilation. Has anyone tried something similar?
>>>>
>>>> _______________________________________________
>>>> 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 VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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 VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>


------------------------------

Message: 3
Date: Thu, 14 Nov 2013 18:58:33 -0500
From: Santiago Alonso P?rez Rubiano <srubiano at purdue.edu>
Subject: Re: [vtkusers] VTK on Xeon Phi
To: David Gobbi <david.gobbi at gmail.com>
Cc: VTK Users <vtkusers at vtk.org>, Santiago Alonso P?rez Rubiano
 <srubiano at purdue.edu>
Message-ID:
 <CAMbvBhhbj0Th8Xb8b8dV4AQxjvvRcXA4YWdHtHJWNDi7nF9nyA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Actually I've been working on compiling Mesa 7.5.1 but yet I have the same
problems.


On Thu, Nov 14, 2013 at 6:50 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> Have you tried an older version of Mesa?  For example, Mesa 7.7.1?
> I've often found Mesa to be difficult to compile, but the Mesa 7
> series seemed to be easier to work with than anything that came
> before or after.
>
> On Thu, Nov 14, 2013 at 4:38 PM, Santiago Alonso P?rez Rubiano
> <srubiano at purdue.edu> wrote:
> > Unfortunately I don't have good news on this. I'm trying to cross-compile
> > libMesa with offscreen support but at some point the compilation fails
> > because of some unsupported assembler instructions on Xeon Phi's intel
> > compiler. I have reported this on Intel forum
> > (http://software.intel.com/en-us/forums/topic/489151) and Mesa's mailing
> > list
> > (
> http://lists.freedesktop.org/archives/mesa-users/2013-November/000704.html
> )
> > and keep working on this.
> >
> >
> > On Wed, Nov 13, 2013 at 9:48 AM, David E DeMarle <
> dave.demarle at kitware.com>
> > wrote:
> >>
> >> As Berk said we haven't tried the Xeon Phi yet.
> >>
> >> VTK does work with OSMesa, See the pure offscreen rendering section of
> >> http://paraview.org/Wiki/ParaView/Users_Guide/Parallel_Rendering
> >> for CMake options to try first.
> >>
> >> To find out how to configure Mesa for the Phi first ask the Mesa mailing
> >> list. On the off chance they can't help, see ParaViewSuperbuild. Here we
> >> take Mesa 7.6.1 (old habits are hard to break) and configure it to cross
> >> compile on Cray's and Blue Gene's. There may be some patterns you could
> >> follow there that might help configure it for the Phi.
> >>
> >> Let us know how it goes. I would like to see this working.
> >>
> >>
> >>
> >>
> >>
> >> David E DeMarle
> >> Kitware, Inc.
> >> R&D Engineer
> >> 21 Corporate Drive
> >> Clifton Park, NY 12065-8662
> >> Phone: 518-881-4909
> >>
> >>
> >> On Wed, Nov 13, 2013 at 9:38 AM, Berk Geveci <berk.geveci at kitware.com>
> >> wrote:
> >>>
> >>> Hi Santiago,
> >>>
> >>> I am very glad that you are working on this. Please let us know how
> >>> things work out. Also, check out my recent post about support for
> shared
> >>> memory parallelism.
> >>>
> >>> Unfortunately, I don't think that anyone at Kitware has tried building
> >>> the whole thing on Xeon Phi so we probably won't be able to help.
> >>>
> >>> Best,
> >>> -berk
> >>>
> >>>
> >>> On Tue, Nov 12, 2013 at 10:36 PM, Santiago Alonso P?rez Rubiano
> >>> <srubiano at purdue.edu> wrote:
> >>>>
> >>>> Has anyone tried (or succeeded at) cross-compiling VTK for Xeon Phi.
> Is
> >>>> it possible to run VTK using only OSMesa?
> >>>>
> >>>> I'm trying to compile libMesa 9.2.2 on the Xeon Phi but I'm having
> >>>> problems configuring the compilation. Has anyone tried something
> similar?
> >>>>
> >>>> _______________________________________________
> >>>> 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 VTK FAQ at:
> >>>> http://www.vtk.org/Wiki/VTK_FAQ
> >>>>
> >>>> Follow this link to subscribe/unsubscribe:
> >>>> http://www.vtk.org/mailman/listinfo/vtkusers
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> 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 VTK FAQ at:
> >>> http://www.vtk.org/Wiki/VTK_FAQ
> >>>
> >>> Follow this link to subscribe/unsubscribe:
> >>> http://www.vtk.org/mailman/listinfo/vtkusers
> >>>
> >>
> >
> >
> > _______________________________________________
> > 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 VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131114/b0c80b22/attachment-0001.htm>

------------------------------

Message: 4
Date: Thu, 14 Nov 2013 19:02:36 -0500
From: Aashish Chaudhary <aashish.chaudhary at kitware.com>
Subject: Re: [vtkusers] vtkInteractorStyleTrackballCamera: panning
 gets heavy then goes into reverse
To: Tim Hutton <tim.hutton at gmail.com>
Cc: vtkusers <vtkusers at vtk.org>
Message-ID:
 <CAEw35Z9TsRrfsj+5p0t75KGvF5EnSUrhB=7hLPjii11gNxnhzA at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

is this problem dependent on distance from the focal point?

- Aashish


On Thu, Nov 14, 2013 at 6:05 PM, Tim Hutton <tim.hutton at gmail.com> wrote:

> I've an odd problem with panning in vtkInteractorStyleTrackballCamera.
> Above a certain threshold of complexity, panning (holding down shift and
> left-dragging) will stop working properly. With more items the scene can no
> longer be dragged around far enough - it feels like it is has got heavy and
> stays in the middle. With even more items the panning actually pulls in the
> opposite direction. Attached an image of such a scene - it's pretty
> reasonable and renders reasonably fast.
>
> I've tested it in VTK 5.10.1 and 6.0.0 and it happens in both.
>
> I've tested on Windows 7 and Windows 8 and Linux (Ubuntu 13.10) and
> strangely it only happens on Windows (both 7 and 8).
>
> Has anyone seen this problem before?
>
> --
> Tim Hutton - http://www.sq3.org.uk -
> http://profiles.google.com/tim.hutton/
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131114/5a6678ef/attachment-0001.htm>

------------------------------

Message: 5
Date: Fri, 15 Nov 2013 03:35:50 +0000
From: <Andrew.Wilkins at csiro.au>
Subject: Re: [vtkusers] vtkExodusIIReader/Writer examples in Python
To: <MEEHANBT at nv.doe.gov>, <vtkusers at vtk.org>
Message-ID:
 <57596E6532C9F54F9DF09BCDFE7B1D3A8647F911 at exmbx06-cdc.nexus.csiro.au>
Content-Type: text/plain; charset="us-ascii"

Hi Tim,

See my code below.  My code was checking that the exodusIIWriter eliminates all side-set (etc) information if you pass it a multiblock VTK.  (If you pass it an exodus it does the correct thing.)

Code snippet:

# Read filename exo_with_ss
r_ss = vtk.vtkExodusIIReader()
r_ss.SetFileName(exo_with_ss)
r_ss.GenerateGlobalNodeIdArrayOn()
r_ss.GenerateGlobalElementIdArrayOn()
r_ss.ExodusModelMetadataOn()
r_ss.UpdateInformation()
# ensure that sidesets are actually loaded, since by default they're not
for ss_id in range(r_ss.GetNumberOfSideSetArrays()):
   r_ss.SetSideSetArrayStatus(r_ss.GetSideSetArrayName(ss_id), 1)

# translate the exodus information to multiblock vtk
r_ss.Update()
r_ss = r_ss.GetOutput()

# print some information
      for i in range(r_ss.GetNumberOfBlocks()):
         blk = r_ss.GetBlock(i)
         if blk.GetNumberOfBlocks() > 0:
            print " " + r_ss.GetMetaData(i).Get(vtk.vtkCompositeDataSet.NAME())
            for j in range(blk.GetNumberOfBlocks()):
               print "  " + blk.GetMetaData(j).Get(vtk.vtkCompositeDataSet.NAME())

# write an exodus file
writer = vtk.vtkExodusIIWriter()
writer.SetFileName(output_file)
writer.SetInputConnection(r_ss.GetProducerPort())
writer.Write()


Ph: +61 7 3327 4497.  Fax: +61 7 3327 4666
Queensland Centre for Advanced Technologies
PO Box 883, Kenmore, Qld, 4069

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Meehan, Bernard
Sent: Thursday, 14 November 2013 8:49 AM
To: vtkusers at vtk.org
Subject: [vtkusers] vtkExodusIIReader/Writer examples in Python

Hi - does anyone have Python examples of how to use vtkExodusIIReader/Writer other than the ones in the documentation?
(namely, TestContourGrid.py)

Thanks,
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131115/c90bcd78/attachment-0001.htm>

------------------------------

Message: 6
Date: Thu, 14 Nov 2013 20:55:34 -0700
From: Chao Liang <chaolian at mtu.edu>
Subject: [vtkusers] Issue: Contour shows on hole point rather than
 field point
To: vtkusers <vtkusers at vtk.org>
Message-ID:
 <CAD4LrppoyYQPzRbRELLc6KpXLuQ2yHdnNtN5g1RkL=vOwh50Og at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I just modified vtkMultiBlockPLOT3DReader to make that iblanking = 0 means
field point while iblanking = 1 means hole point. And mesh shows correctly
and as what I expect.

But when I generate contour, the strange thing is that it draws contour on
hole point rather than field point, which is not correct. I really don't
know why.

Can anybody help me on this?
Thanks in advance,

Chao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131114/9f004f1b/attachment-0001.htm>

------------------------------

Message: 7
Date: Fri, 15 Nov 2013 00:11:08 -0800 (PST)
From: Massinissa Bandou <Massinissa.Bandou at USherbrooke.ca>
Subject: [vtkusers] Volume extraction
To: vtkusers at vtk.org
Message-ID: <1384503068980-5724460.post at n5.nabble.com>
Content-Type: text/plain; charset=us-ascii

Hello VTK!!

I used vtkMarchingCubes to generate an isosurface of a region of a volume
and I'm wondering how can I use vtkExtractVOI or something else to extract
the volume within a closed isosurface.

thank you for your help!

Massi

<http://vtk.1045678.n5.nabble.com/file/n5724460/test.png> 



--
View this message in context: http://vtk.1045678.n5.nabble.com/Volume-extraction-tp5724460.html
Sent from the VTK - Users mailing list archive at Nabble.com.


------------------------------

Message: 8
Date: Fri, 15 Nov 2013 09:16:15 +0100
From: amal jerbi <am.jerbi at gmail.com>
Subject: [vtkusers] Pixel Value on Mouse Over with java
To: vtkusers at vtk.org
Message-ID:
 <CABf2nGXoO04FO8n-zSbWAAMOSTH8=onfGixE62bN1XTgS095Ag at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I want to pick the pixel value of an image i found this C++ example on net

http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27

but no idea how to write this code with java:

   1. unsigned short* pPix = (unsigned short*)pImageData->GetScalarPointer()
   ;
   2.           unsigned short usPix = pPix[nVolIdx];
   3.           FmtStr(m_strDetails, "Pixel val = [" << usPix << "]   at
   index [" << nVolIdx << "],  coordinates(" << ptMapped[0] << "," <<
   ptMapped[1] << ")");

   Indeed, with vtk wrapped java i dont find the method GetScalarPointer

   Best,
   Amal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131115/6101c3c5/attachment-0001.htm>

------------------------------

Message: 9
Date: Fri, 15 Nov 2013 10:58:00 +0100
From: D?enan Zuki? <dzenanz at gmail.com>
Subject: Re: [vtkusers] Volume extraction
To: Massinissa Bandou <Massinissa.Bandou at usherbrooke.ca>
Cc: vtkusers <vtkusers at vtk.org>
Message-ID:
 <CAPf2UMQKUKMU_YEf=0dAqvoQ3q+yn_9gcWdcpD53+nVJ01rnmw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

What do you mean by extract? Clip the image - set to 0 all values outside
the mesh, and perhaps resize the image to the non-zero bounding box? Or
clip the polygonal mesh such that triangles outside some bounding box are
removed from the mesh?

In the first case you should start by looking at the appropriate
example<http://www.vtk.org/Wiki/VTK/Examples/Cxx/ImageData/ExtractVOI>.
To create voxel mask of the closed surface, take a look at this
example<http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataToImageData>.
Then you can multiply voxel mask with image values to get a clipped volume.

In the second case, you should consider
http://www.vtk.org/doc/nightly/html/classvtkClipPolyData.html or
http://www.vtk.org/doc/nightly/html/classvtkExtractGeometry.html


On Fri, Nov 15, 2013 at 9:11 AM, Massinissa Bandou <
Massinissa.Bandou at usherbrooke.ca> wrote:

> Hello VTK!!
>
> I used vtkMarchingCubes to generate an isosurface of a region of a volume
> and I'm wondering how can I use vtkExtractVOI or something else to extract
> the volume within a closed isosurface.
>
> thank you for your help!
>
> Massi
>
> <http://vtk.1045678.n5.nabble.com/file/n5724460/test.png>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Volume-extraction-tp5724460.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131115/aae3f254/attachment-0001.htm>

------------------------------

Message: 10
Date: Fri, 15 Nov 2013 10:48:38 +0000
From: "Biddiscombe, John A." <biddisco at cscs.ch>
Subject: Re: [vtkusers] Depth sorter question
To: Serge Lalonde <serge at infolytica.com>, David E DeMarle
 <dave.demarle at kitware.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID:
 <50320452A334BD42A5EC72BAD2145099096D88BB at MBX110.d.ethz.ch>
Content-Type: text/plain; charset="us-ascii"

Serge

The answer is no then.

I have made my own depth sorting routines (for individual datasets) and considered having a composite depth mapper which accepts multiple datasets and sorts them accordingly, but it would be quite a bit of work, because the ideal solution would traverse the individual datasets in place without requiring a copy into one monster dataset. Worth thinking about though.

JB


From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Serge Lalonde
Sent: 14 November 2013 22:17
To: David E DeMarle
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Depth sorter question

Sorry, I should have mentioned that this is the backup transparency method for when the depth peeling isn't available.
On 11/14/2013 3:46 PM, David E DeMarle wrote:
Try depth peeling instead of vtkDepthSortPolyData since it will sort the entire scene, not just one object.
ie
http://www.vtk.org/Wiki/VTK/Depth_Peeling
instead of
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DepthSortPolyData

On Thu, Nov 14, 2013 at 1:36 PM, Serge Lalonde <serge at infolytica.com<mailto:serge at infolytica.com>> wrote:
Is it possible to use the depth sorter for transparency when there are multiple actors, each with their own mapper, in the same renderer?

We have this setup because we want to be able to use the vtkInteractorStyleTrackballCamera in actor mode to manipulate the multiple actors individually.

Thanks!
--
www.infolytica.com <http://:/www.infolytica.com>
300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3
(514) 849-8752 x236, Fax: (514) 849-4239
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131115/d616cd06/attachment-0001.htm>

------------------------------

Message: 11
Date: Fri, 15 Nov 2013 08:07:47 -0500
From: David Doria <daviddoria at gmail.com>
Subject: Re: [vtkusers] Pixel Value on Mouse Over with java
To: amal jerbi <am.jerbi at gmail.com>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID:
 <CABDpjTmRVYuXBcdBz56m5n1soAx3UKjtWQ6zsLOxBXex04KC9A at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Nov 15, 2013 at 3:16 AM, amal jerbi <am.jerbi at gmail.com> wrote:
> Hi,
>
> I want to pick the pixel value of an image i found this C++ example on net
>
> http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27
>
> but no idea how to write this code with java:
>
> unsigned short* pPix = (unsigned short*)pImageData->GetScalarPointer();
>           unsigned short usPix = pPix[nVolIdx];
>           FmtStr(m_strDetails, "Pixel val = [" << usPix << "]   at index ["
> << nVolIdx << "],  coordinates(" << ptMapped[0] << "," << ptMapped[1] <<
> ")");
>
> Indeed, with vtk wrapped java i dont find the method GetScalarPointer
>
> Best,
> Amal

Unfortunately I don't know how to do this, but when you figure it out,
I'd be great if you would add an example here:
http://www.vtk.org/Wiki/VTK/Examples/Java

David


------------------------------

Message: 12
Date: Fri, 15 Nov 2013 08:50:46 -0500
From: David Thompson <david.thompson at kitware.com>
Subject: Re: [vtkusers] vtkExodusIIReader/Writer examples in Python
To: "Meehan, Bernard" <MEEHANBT at nv.doe.gov>
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID: <345B0798-6AAF-47B5-9008-4E979E9498B1 at kitware.com>
Content-Type: text/plain; charset=us-ascii

> ... The datasets that I have contain two features that I would like to get at
> - global information, like total energy input, total kinetic energy, etc.,
> that I would like to be able to graph,

Those will be read if you add:

rdr.SetAllArrayStatus(rdr.GLOBAL,1)

to the script.

> and then unstructured blocks
> hexahedrons with point and cell data that I would like to (for example) be
> able to probe with a plane. I have looked at the files with 'ncdump' but
> wasn't sure how the various structures end up the vtkExodusIIReader
> object. I could have the wrong idea about Exodus II files as well - my
> understanding of the format does not go much past "they end in .exo"

There is manual for the Exodus library API that includes some information about storage conventions on the SourceForge page:
 http://sourceforge.net/projects/exodusii/files/Documentation/Documentation/

> 
> I think I have a good-ish idea of what should be in the file, just not so
> good of an idea of how to get it and plot it, etc. If I were to have a
> wish list of things for examples it might read something like:
> 
> Print out the list of global information (like 'EKIN', the kinetic
> energy), select one and plot it in 2D.

You might look at using the vtkExtractArraysOverTime filter to get a time series of global information, but I am not sure how fast that will be. The ExodusIIReader has a mechanism called "FastPath" (you'll see it in the reader's documentation) that will extract one point- or cell-value over time, but I don't think it works for global variables -- so the reader may have to cycle through all the time steps manually to extract it.

> Print out a list of the node or cell information (like 'DENSITY'), and
> plot it in 3D.

I'm not sure what you mean by "plot it in 3-D" means... do you mean color the mesh with the variable? Or a 3-D scatter plot? There should by python examples on the VTK wiki that deal with the former. The latter is possible but not terribly straightforward.

You can list the node and cell variables for any dataset like so:

ugrid = rdr.GetOutput().GetBlock(0).GetBlock(0)
print 'Point Data:'
fields = ugrid.GetPointData()
for i in range(fields.GetNumberOfArrays()):
  print '  ' + fields.GetAbstractArray(i).GetName()
print 'Cell Data:'
fields = ugrid.GetCellData()
for i in range(fields.GetNumberOfArrays()):
  print '  ' + fields.GetAbstractArray(i).GetName()

 David


> On 11/14/13 6:47 AM, "David Thompson" <david.thompson at kitware.com> wrote:
> 
>> Hi Tim,
>> 
>>> ... does anyone have Python examples of how to use
>>> vtkExodusIIReader/Writer other than the ones in the documentation?
>>> (namely, TestContourGrid.py)
>> 
>> Not using both together, but attached is a simple reader example that
>> fetches some data and computes order statistics (quantiles) on one array.
>> You'll have to edit the "SetFileName" line to point to a checkout of the
>> ParaViewData directory. Was there some particular feature you are having
>> trouble with?
>> 
>>  David
>> 
> 
> 



------------------------------

Message: 13
Date: Fri, 15 Nov 2013 06:51:46 -0800 (PST)
From: Harold <boogiedoll at yahoo.com>
Subject: [vtkusers] Surface Mesh of Equilateral Triangles
To: "vtkusers at vtk.org" <vtkusers at vtk.org>
Message-ID:
 <1384527106.34126.YahooMailNeo at web125603.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="us-ascii"

Is there any method to generate a surface mesh of equilateral triangles in vtk from iso-surface?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131115/270ce6f9/attachment-0001.htm>

------------------------------

_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers


End of vtkusers Digest, Vol 115, Issue 22
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131117/a9049ed3/attachment.htm>


More information about the vtkusers mailing list