[vtkusers] VTK Example - AreaPicking

Allan James ar.james at qut.edu.au
Tue Jan 26 17:58:35 EST 2010


Hi Liam,

Actually after playing with this, although adding the observer to the picker instead of the interactor seems to work - I am not sure if this is the correct way.

I think the reason the red outline appears might be because the interactor is triggering its own default picker as well.. Can anyone confirm this?

Can anyone who has experience with pickers provide any comment on the correctness of this example?  (... Wiki/VTK/Examples/AreaPicking)

cheers

Allan James
High Performance Computing & Research Support
Queensland University of Technology
(07) 3138 9264
ar.james at qut.edu.au
http://www.qut.edu.au/its/hpc

><(((º>  ._.·´¯`·..  >++(((º>  ._.·´¯`·..  >++(((º>


> -----Original Message-----
> From: vtkusers-bounces at vtk.org
> [mailto:vtkusers-bounces at vtk.org] On Behalf Of
> vtkusers-request at vtk.org
> Sent: Wednesday, 27 January 2010 3:02 AM
> To: vtkusers at vtk.org
> Subject: vtkusers Digest, Vol 69, Issue 36
>
> 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: problems with setting camera distance (Liam Kurmos)
>    2. Re: Get all points within a sphere (Andy Bauer)
>    3. Infinite recursion in vtkDelaunay2D::CheckEdge (Kenneth Porter)
>    4. Efficiency problem in mesh display script ; TCL - VTK
>       (Rafal Robak)
>    5. flat shading in vtk (Liam Kurmos)
>    6. Re: Efficiency problem in mesh display script ; TCL - VTK
>       (Vincent Magnotta)
>    7. Re: flat shading in vtk (David Gobbi)
>    8. Re: flat shading in vtk (David Doria)
>    9. Re: flat shading in vtk (David Gobbi)
>   10. Re: importing image data into VTK from textfile (mimics)
>       (Bill Lorensen)
>   11. Re: Reading independent Data into VTK (Dominik Szczerba)
>   12. VTK Example - AreaPicking (Allan James)
>   13. Re: ThinPlatespline issue (Eric Barn)
>   14. Produce an MPEG file from a stack of JPEG image
> (Fireman Fireman)
>   15. Re: VTK Example - AreaPicking (Liam Kurmos)
>   16. Re: Produce an MPEG file from a stack of JPEG image
>       (Kevin H. Hobbs)
>   17. Re: Produce an MPEG file from a stack of JPEG image
>       (Fireman Fireman)
>   18. Re: Infinite recursion in vtkDelaunay2D::CheckEdge
> (Bill Lorensen)
>   19. Re: Produce an MPEG file from a stack of JPEG image
>       (Kevin H. Hobbs)
>   20. Re: Produce an MPEG file from a stack of JPEG image
> (David Doria)
>   21. vtkXYPlotActor ReverseAxis (Trevor Irons)
>   22. Re: Infinite recursion in vtkDelaunay2D::CheckEdge
>       (Kenneth Porter)
>   23. vtkDataArray: Memory allocation problem (Malsoaz James)
>   24. Re: vtkDataArray: Memory allocation problem (Bill Lorensen)
>   25. Re: Produce an MPEG file from a stack of JPEG image
>       (Kevin H. Hobbs)
>   26. Windows: Correctly linking the debug and release libraries in
>       a CMake-based project (Lars Bilke)
>   27. Re: Produce an MPEG file from a stack of JPEG image
> (David Doria)
>   28. Re: Windows: Correctly linking the debug and release
>       libraries in a CMake-based project (John Drescher)
>   29. Re: Windows: Correctly linking the debug and release
>       libraries in a CMake-based project (Michael Jackson)
>   30. Re: Extract a curvilinear slice of volume (toulgen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 25 Jan 2010 17:26:46 +0000
> From: Liam Kurmos <quantum.leaf at googlemail.com>
> Subject: Re: [vtkusers] problems with setting camera distance
> To: vtk <vtkusers at vtk.org>
> Message-ID:
>       <e90a17d21001250926m7982096dr9e6c9154192ff822 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Many thanks to both of you for clearing that up.
> It all makes sense now. Checking back with the documentation I see i
> should have read it more carefully.
>
> thanks for your help,
>
> Liam
>
>
> On Mon, Jan 25, 2010 at 4:36 PM, David Gobbi
> <david.gobbi at gmail.com> wrote:
> > Hi Liam,
> >
> > The SetDistance() methods works by changing the position of the
> > FocalPoint, while keeping the Position at the same place.
> ?The Dolly()
> > method moves the Position, but it doesn't take a distance as an
> > argument. ?Instead, it sets the new distance by dividing the current
> > distance by the "dolly" value.
> >
> > When I use the vtkCamera, I prefer to simply use SetFocalPoint,
> > SetPosition, and SetViewUp. ?Even if it means adding a bit
> of math to
> > my code. ?By doing this, I avoid the confusion about what all those
> > other methods are actually doing.
> >
> > ? ?David
> >
> >
> > On Mon, Jan 25, 2010 at 9:23 AM, Liam Kurmos
> > <quantum.leaf at googlemail.com> wrote:
> >> Hi,
> >>
> >> I'm still getting to grips with vtk. Building up a picture
> of how to
> >> use it from the books and examples.
> >>
> >> I have a vtkImageData which I initialise with gaussian data, and
> >> render a contour taken with marching cubes. I've been using
> >> vtkCamera.Azimuth() and vtkCamera.Elevevation() to control
> the viewing
> >> angle.
> >>
> >> Now i want to control the distance from the focal point. From the
> >> doxygen i thought this would be simple using
> setDistance/Dolly but i
> >> can't get it to work as expected.
> >>
> >> I've been experimenting with code like:
> >>
> >> ren1->AddActor(contourActor);
> >> ? ?vtkCamera* cam1=vtkCamera::New();
> >> ? ?cam1->SetFocalPoint(0,0,0);
> >> ? ?cam1->SetDistance(10);
> >> ? ?cam1->Dolly(-30);
> >> ? ?ren1->SetActiveCamera(cam1);
> >> ? ?//ren1->ResetCamera();
> >> ? ?cam1->SetDistance(10);
> >> ? ?//ren1->GetActiveCamera()->Dolly(200);
> >> ? ?cout<<"dist is "<<ren1->GetActiveCamera()->GetDistance()<<endl;
> >>
> >>
> >> I find that SetDistance changes the value report by
> GetDistance, but
> >> not what is rendered on the screen. Doing a negative Dolly has no
> >> effect, Doing a positive dolly affect the reported distance but not
> >> what is rendered on the screen. Doing a ResetCamera() affects the
> >> reported distance and changes what is rendered on the screen.
> >>
> >> I've started using SetPosition() and this seems to work as
> i would expect.
> >>
> >> Is VtkCamera::setDistance() broken, or am I using it incorrectly?
> >>
> >> regards,
> >>
> >> Liam
> >> _______________________________________________
> >> 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: 2
> Date: Mon, 25 Jan 2010 12:49:34 -0500
> From: Andy Bauer <andy.bauer at kitware.com>
> Subject: Re: [vtkusers] Get all points within a sphere
> To: vtkusers at vtk.org, jothybasu at gmail.com, daviddoria+vtk at gmail.com
> Message-ID:
>       <c9010c7d1001250949w72efddd7g3a2ea6d204829065 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Did you look at vtkPointLocator::FindPointsWithinRadius() ?
>
>
>
> >
> > Message: 12
> > Date: Mon, 25 Jan 2010 14:41:08 +0000
> > From: KS Jothybasu < <jothybasu at gmail.com>>
> > Subject: Re: [vtkusers] Get all points within a sphere
> > To: David Doria <daviddoria+vtk at gmail.com
> <daviddoria%2Bvtk at gmail.com>>,
> > vtkusers at vtk.org
> > Message-ID:
> >        <1dd3c8b21001250641v645adcdfq7197ae90cd94238a at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Partially yes, this is a bit different way, but still I
> will try your "
> > CHECK WHETHER A POINT IS INSIDE AN ACTOR"
> >
> >
> > Thanks
> >
> > Jothy
> >
> > On Mon, Jan 25, 2010 at 12:57 PM, David Doria
> > <daviddoria+vtk at gmail.com <daviddoria%2Bvtk at gmail.com><
> > daviddoria%2Bvtk at gmail.com <daviddoria%252Bvtk at gmail.com>>
> > > wrote:
> >
> > > On Mon, Jan 25, 2010 at 6:16 AM, KS Jothybasu
> <jothybasu at gmail.com>
> > wrote:
> > >
> > >> Hi all,
> > >>
> > >> Is there any method to get all the points within a
> sphere. By using that
> > >> coordinates I want to modify the scalar values of the
> vtkImageData.
> > >>
> > >> Thanks
> > >>
> > >> Jothy
> > >>
> > >>
> > > Didn't I already answer this question last time you asked 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 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/20100125/54
> 067165/attachment-0001.htm>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 25 Jan 2010 10:33:19 -0800
> From: Kenneth Porter <shiva at sewingwitch.com>
> Subject: [vtkusers] Infinite recursion in vtkDelaunay2D::CheckEdge
> To: vtkusers at vtk.org
> Message-ID: <59EF2856841DF44E4CA19F35@[10.0.0.199]>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> I'm converting a point cloud to a surface with vtkDelaunay2D
> and one of my
> data sets is throwing a Stack Overflow due to runaway recursion in
> CheckEdge. Is this a known bug? I'm not real familiar with
> the algorithm so
> I don't know what the termination condition should look like.
> What should
> be the maximum depth of the stack for a given data set size?
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 25 Jan 2010 21:46:55 +0100
> From: Rafal Robak <rafalrobak at gmail.com>
> Subject: [vtkusers] Efficiency problem in mesh display script ; TCL -
>       VTK
> To: vtkusers at vtk.org
> Message-ID:
>       <3fcc991e1001251246p1999b510xe4e45ca1da4449ce at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-2"
>
> Hi,
> I'm looking for 3d engine to display a mesh from FEM
> softwares like ANSYS
> cdb file / Nastran bdf file. First of all i would like to
> display FEM model
> in 3D interactive GL window. I choose TCL and VTK and i
> create following
> code. In entry widget i define a quantity of nodes and
> elements in node and
> element file and then based on function invoked from 'Render'
> button model
> is displayed.
> Problem is in efficiency. Because each element is created as
> separate object
> (i would like to display models above 1000000 elements) VTK
> has big problem.
> VTK has possibility to create something like poly
> vtkHexahedron object ?
> in vertex is polyvertex and therefore i'm wondering about
> poly hex object ?
> Do you have any idea ?
> Best regards,
>
> ####### CODE #######
> package require vtk
> package require vtkinteraction
> package require vtktesting
> package require Tcl
> package require Tk
>
> global qty
>
> # Main code
> vtkRenderer model_renderer
> [model_renderer GetCullers] RemoveAllItems
>
> vtkRenderWindow model_window
> model_window AddRenderer model_renderer
>
> model_renderer SetBackground .5 .5 .5
>
> model_renderer ResetCamera
> [model_renderer GetActiveCamera] Dolly 2.5
> model_renderer ResetCameraClippingRange
>
> vtkRenderWindowInteractor iaction
> iaction SetRenderWindow model_window
>
> wm title . "CDB reader"
> label .l1 -text "OpenGL module ver 0.1 - CDB Reader"
> frame .f1
> entry .e1 -textvariable node_qty
> entry .e2 -textvariable elem_qty
> button .b1 -text "Open node" -command "open_model_node node_qty"
> button .b2 -text "Open elem" -command "open_model_elem elem_qty"
> button .b3 -text "Render" -command "render elem_qty"
> button .b4 -text "Close" -command "destroy ."
> set render_widget [vtkTkRenderWidget .f1.r -width 800 -height 600 -rw
> model_window]
> iaction Initialize
> ::vtk::bind_tk_render_widget $render_widget
>
> grid .l1 -row 1 -column 1 -columnspan 7
> grid .f1 -row 2 -column 1 -columnspan 7
> grid .e1 -row 3 -column 2
> grid .e2 -row 3 -column 3
> grid .b1 -row 3 -column 4
> grid .b2 -row 3 -column 5
> grid .b3 -row 3 -column 6
> grid .b4 -row 3 -column 7
> grid .f1.r -row 1 -column 1
>
> .b3 configure -state disabled
>
> #$render_widget Render
>
> proc generate {qty} {
> upvar 1 $qty qty_loc
> set fw [open node_file.txt w]
> for {set i 1} {$i <= $qty_loc} {incr i} {
> puts $fw "$i [expr rand()] [expr rand()] [expr rand()]"
> }
> close $fw
> }
>
>
> proc open_model_node {node_qty} {
> global ndata
> upvar 1 $node_qty node_qty_loc
>
> set file_select [tk_getOpenFile -initialdir [pwd]]
> set fr_node [open $file_select r]
>
> for {set i 1} {$i <= $node_qty_loc} {incr i} {
> set line [gets $fr_node]
> lappend ndata([lindex $line 0]) [lindex $line 1]
> lappend ndata([lindex $line 0]) [lindex $line 2]
> lappend ndata([lindex $line 0]) [lindex $line 3]
> }
> close $fr_node
> }
>
> proc open_model_elem {elem_qty} {
> global edata
> upvar 1 $elem_qty elem_qty_loc
>
> set file_select [tk_getOpenFile -initialdir [pwd]]
> set fr_elem [open $file_select r]
>
> for {set i 1} {$i <= $elem_qty_loc} {incr i} {
> set line [gets $fr_elem]
> lappend edata($i) [lindex $line 13]
> lappend edata($i) [lindex $line 0]
> lappend edata($i) [lindex $line 1]
> lappend edata($i) [lindex $line 2]
> lappend edata($i) [lindex $line 3]
> lappend edata($i) [lindex $line 4]
> lappend edata($i) [lindex $line 5]
> lappend edata($i) [lindex $line 6]
> lappend edata($i) [lindex $line 7]
> }
>
>
> .b3 configure -state normal
> }
>
> proc clear {} {
> model_renderer Clear
> model_window Clear
> }
>
> proc element {eid n1 n2 n3 n4 n5 n6 n7 n8} {
> global ndata
>
> vtkPoints hexahedronPoints_$eid
> hexahedronPoints_$eid SetNumberOfPoints 8
> hexahedronPoints_$eid InsertPoint 0 [lindex $ndata($n1) 0] [lindex
> $ndata($n1) 1] [lindex $ndata($n1) 2]
> hexahedronPoints_$eid InsertPoint 1 [lindex $ndata($n2) 0] [lindex
> $ndata($n2) 1] [lindex $ndata($n2) 2]
> hexahedronPoints_$eid InsertPoint 2 [lindex $ndata($n3) 0] [lindex
> $ndata($n3) 1] [lindex $ndata($n3) 2]
> hexahedronPoints_$eid InsertPoint 3 [lindex $ndata($n4) 0] [lindex
> $ndata($n4) 1] [lindex $ndata($n4) 2]
> hexahedronPoints_$eid InsertPoint 4 [lindex $ndata($n5) 0] [lindex
> $ndata($n5) 1] [lindex $ndata($n5) 2]
> hexahedronPoints_$eid InsertPoint 5 [lindex $ndata($n6) 0] [lindex
> $ndata($n6) 1] [lindex $ndata($n6) 2]
> hexahedronPoints_$eid InsertPoint 6 [lindex $ndata($n7) 0] [lindex
> $ndata($n7) 1] [lindex $ndata($n7) 2]
> hexahedronPoints_$eid InsertPoint 7 [lindex $ndata($n8) 0] [lindex
> $ndata($n8) 1] [lindex $ndata($n8) 2]
> vtkHexahedron aHexahedron_$eid
> [aHexahedron_$eid GetPointIds] SetId 0 0
> [aHexahedron_$eid GetPointIds] SetId 1 1
> [aHexahedron_$eid GetPointIds] SetId 2 2
> [aHexahedron_$eid GetPointIds] SetId 3 3
> [aHexahedron_$eid GetPointIds] SetId 4 4
> [aHexahedron_$eid GetPointIds] SetId 5 5
> [aHexahedron_$eid GetPointIds] SetId 6 6
> [aHexahedron_$eid GetPointIds] SetId 7 7
> vtkUnstructuredGrid aHexahedronGrid_$eid
> aHexahedronGrid_$eid Allocate 1 1
> aHexahedronGrid_$eid InsertNextCell [aHexahedron_$eid GetCellType]
> [aHexahedron_$eid GetPointIds]
> aHexahedronGrid_$eid SetPoints hexahedronPoints_$eid
> vtkDataSetMapper aHexahedronMapper_$eid
> aHexahedronMapper_$eid SetInput aHexahedronGrid_$eid
> vtkActor aHexahedronActor_$eid
> aHexahedronActor_$eid SetMapper aHexahedronMapper_$eid
> [aHexahedronActor_$eid GetProperty] SetColor 0.5 1 1
>
> model_renderer AddActor aHexahedronActor_$eid
> }
>
> proc render {elem_qty} {
> global ndata
> global edata
> upvar 1 $elem_qty elem_qty_loc
>
> for {set i 1} {$i <= $elem_qty_loc} {incr i} {
> element [lindex $edata($i) 0] [lindex $edata($i) 1] [lindex
> $edata($i) 2]
> [lindex $edata($i) 3] [lindex $edata($i) 4] [lindex
> $edata($i) 5] [lindex
> $edata($i) 6] [lindex $edata($i) 7] [lindex $edata($i) 8]
> }
>
> model_renderer ResetCamera
> }
>
> ####### CODE #######
>
> --
> Rafa? Robak
> www.robak.info
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100125/77
> 5685a2/attachment-0001.htm>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 25 Jan 2010 21:05:09 +0000
> From: Liam Kurmos <quantum.leaf at googlemail.com>
> Subject: [vtkusers] flat shading in vtk
> To: vtk <vtkusers at vtk.org>
> Message-ID:
>       <e90a17d21001251305i478feab7o38669d85f8709e70 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Is there an easy way to disable shading in vtk?
> I want all pixels drawn for a polygon to be constant colour,
> independent of surface normals.
>
> I'm going to try having only an emissive color and turning off a
> lights, but now i'm stuck turning off the default light.
>
> ren1->RemoveAllLights();
>
> doesn't seem to be having any effect.
>
> searches like
>
> "site:vtk.org/Wiki/VTK/Examples getLights"
>
> are coming up blank, so i wonder if i'm on the right track.
>
> any help much appreciated,
>
>
> Liam
>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 25 Jan 2010 15:04:55 -0600
> From: Vincent Magnotta <vincent-magnotta at uiowa.edu>
> Subject: Re: [vtkusers] Efficiency problem in mesh display script ;
>       TCL - VTK
> To: Rafal Robak <rafalrobak at gmail.com>,       <vtkusers at vtk.org>
> Message-ID: <C7836397.D7A3%vincent-magnotta at uiowa.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I believe that you want to use vtkUnstructuredGrid to
> represent the object.
>
> Vince
>
>
>
> On 1/25/10 2:46 PM, "Rafal Robak" <rafalrobak at gmail.com> wrote:
>
> > Hi,
> > I'm looking for 3d engine to display a mesh from FEM
> softwares like ANSYS cdb
> > file / Nastran bdf file. First of all i would like to
> display FEM model in 3D
> > interactive GL window. I choose TCL and VTK and i create
> following code. In
> > entry widget i define a quantity of nodes and elements in
> node and element
> > file and then based on function invoked from 'Render'
> button model is
> > displayed.?
> > Problem is in efficiency. Because each element is created
> as separate object
> > (i would like to display models above 1000000 elements) VTK
> has big problem.
> > VTK has possibility to create something like
> poly?vtkHexahedron object ?
> > in vertex is polyvertex and therefore i'm wondering about
> poly hex object ?
> > Do you have any idea ?
> > Best regards,
> >
> > ####### CODE?#######
> > package require vtk
> > package require vtkinteraction
> > package require vtktesting
> > package require Tcl
> > package require Tk
> >
> > global qty
> >
> > # Main code
> > vtkRenderer model_renderer
> > [model_renderer GetCullers] RemoveAllItems
> >
> > vtkRenderWindow model_window
> > model_window AddRenderer model_renderer
> >
> > model_renderer SetBackground .5 .5 .5
> >
> > model_renderer ResetCamera
> > [model_renderer GetActiveCamera] Dolly 2.5
> > model_renderer ResetCameraClippingRange
> >
> > vtkRenderWindowInteractor iaction
> > iaction SetRenderWindow model_window
> >
> > wm title . "CDB reader"
> > label .l1 -text "OpenGL module ver 0.1 - CDB Reader"
> > frame .f1
> > entry .e1 -textvariable node_qty
> > entry .e2 -textvariable elem_qty
> > button .b1 -text "Open node" -command "open_model_node node_qty"
> > button .b2 -text "Open elem" -command "open_model_elem elem_qty"
> > button .b3 -text "Render" -command "render elem_qty"
> > button .b4 -text "Close" -command "destroy ."
> > set render_widget [vtkTkRenderWidget .f1.r -width 800
> -height 600 -rw
> > model_window]
> > iaction Initialize
> > ::vtk::bind_tk_render_widget $render_widget
> >
> > grid .l1 -row 1 -column 1 -columnspan 7
> > grid .f1 -row 2 -column 1 -columnspan 7
> > grid .e1 -row 3 -column 2
> > grid .e2 -row 3 -column 3
> > grid .b1 -row 3 -column 4
> > grid .b2 -row 3 -column 5
> > grid .b3 -row 3 -column 6
> > grid .b4 -row 3 -column 7
> > grid .f1.r -row 1 -column 1
> >
> > .b3 configure -state disabled
> >
> > #$render_widget Render
> >
> > proc generate {qty} {
> > upvar 1 $qty qty_loc
> > set fw [open node_file.txt w]
> > for {set i 1} {$i <= $qty_loc} {incr i} {
> > puts $fw "$i [expr rand()] [expr rand()] [expr rand()]"
> > }
> > close $fw
> > }
> >
> >
> > proc open_model_node {node_qty} {
> > global ndata
> > upvar 1 $node_qty node_qty_loc
> >
> > set file_select [tk_getOpenFile -initialdir [pwd]]
> > set fr_node [open $file_select r]
> >
> > for {set i 1} {$i <= $node_qty_loc} {incr i} {
> > set line [gets $fr_node]
> > lappend ndata([lindex $line 0]) [lindex $line 1]
> > lappend ndata([lindex $line 0]) [lindex $line 2]
> > lappend ndata([lindex $line 0]) [lindex $line 3]
> > }
> > close $fr_node
> > }
> >
> > proc open_model_elem {elem_qty} {
> > global edata
> > upvar 1 $elem_qty elem_qty_loc
> >
> > set file_select [tk_getOpenFile -initialdir [pwd]]
> > set fr_elem [open $file_select r]
> >
> > for {set i 1} {$i <= $elem_qty_loc} {incr i} {
> > set line [gets $fr_elem]
> > lappend edata($i) [lindex $line 13]
> > lappend edata($i) [lindex $line 0]
> > lappend edata($i) [lindex $line 1]
> > lappend edata($i) [lindex $line 2]
> > lappend edata($i) [lindex $line 3]
> > lappend edata($i) [lindex $line 4]
> > lappend edata($i) [lindex $line 5]
> > lappend edata($i) [lindex $line 6]
> > lappend edata($i) [lindex $line 7]
> > }
> >
> >
> > .b3 configure -state normal
> > }
> >
> > proc clear {} {
> > model_renderer Clear
> > model_window Clear
> > }
> >
> > proc element {eid n1 n2 n3 n4 n5 n6 n7 n8} {
> > global ndata
> >
> > vtkPoints hexahedronPoints_$eid
> >   hexahedronPoints_$eid SetNumberOfPoints 8
> >   hexahedronPoints_$eid InsertPoint 0 [lindex $ndata($n1) 0] [lindex
> > $ndata($n1) 1] [lindex $ndata($n1) 2]
> >   hexahedronPoints_$eid InsertPoint 1 [lindex $ndata($n2) 0] [lindex
> > $ndata($n2) 1] [lindex $ndata($n2) 2]
> >   hexahedronPoints_$eid InsertPoint 2 [lindex $ndata($n3) 0] [lindex
> > $ndata($n3) 1] [lindex $ndata($n3) 2]
> >   hexahedronPoints_$eid InsertPoint 3 [lindex $ndata($n4) 0] [lindex
> > $ndata($n4) 1] [lindex $ndata($n4) 2]
> >   hexahedronPoints_$eid InsertPoint 4 [lindex $ndata($n5) 0] [lindex
> > $ndata($n5) 1] [lindex $ndata($n5) 2]
> >   hexahedronPoints_$eid InsertPoint 5 [lindex $ndata($n6) 0] [lindex
> > $ndata($n6) 1] [lindex $ndata($n6) 2]
> >   hexahedronPoints_$eid InsertPoint 6 [lindex $ndata($n7) 0] [lindex
> > $ndata($n7) 1] [lindex $ndata($n7) 2]
> >   hexahedronPoints_$eid InsertPoint 7 [lindex $ndata($n8) 0] [lindex
> > $ndata($n8) 1] [lindex $ndata($n8) 2]
> > vtkHexahedron aHexahedron_$eid
> >   [aHexahedron_$eid GetPointIds] SetId 0 0
> >   [aHexahedron_$eid GetPointIds] SetId 1 1
> >   [aHexahedron_$eid GetPointIds] SetId 2 2
> >   [aHexahedron_$eid GetPointIds] SetId 3 3
> >   [aHexahedron_$eid GetPointIds] SetId 4 4
> >   [aHexahedron_$eid GetPointIds] SetId 5 5
> >   [aHexahedron_$eid GetPointIds] SetId 6 6
> >   [aHexahedron_$eid GetPointIds] SetId 7 7
> > vtkUnstructuredGrid aHexahedronGrid_$eid
> >   aHexahedronGrid_$eid Allocate 1 1
> >   aHexahedronGrid_$eid InsertNextCell [aHexahedron_$eid GetCellType]
> > [aHexahedron_$eid GetPointIds]
> >   aHexahedronGrid_$eid SetPoints hexahedronPoints_$eid
> > vtkDataSetMapper aHexahedronMapper_$eid
> >   aHexahedronMapper_$eid SetInput aHexahedronGrid_$eid
> > vtkActor aHexahedronActor_$eid
> >   aHexahedronActor_$eid SetMapper aHexahedronMapper_$eid
> >   [aHexahedronActor_$eid GetProperty] SetColor 0.5 1 1
> >
> > model_renderer AddActor aHexahedronActor_$eid
> > }
> >
> > proc render {elem_qty} {
> > global ndata
> > global edata
> > upvar 1 $elem_qty elem_qty_loc
> >
> > for {set i 1} {$i <= $elem_qty_loc} {incr i} {
> > element [lindex $edata($i) 0] [lindex $edata($i) 1] [lindex
> $edata($i) 2]
> > [lindex $edata($i) 3] [lindex $edata($i) 4] [lindex
> $edata($i) 5] [lindex
> > $edata($i) 6] [lindex $edata($i) 7] [lindex $edata($i) 8]
> > }
> >
> > model_renderer ResetCamera
> > }
> >
> > ####### CODE?#######
>
> ----------------------
> Associate Professor
> Department of Radiology
> 0453-D JCP
> 200 Hawkins Drive
> Iowa City, IA 52242
> E-mail: vincent-magnotta at uiowa.edu
> Phone: 319-356-8255 Fax: 319-353-6275
> Website: http://www.radiology.uiowa.edu
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100125/7f
> d120b7/attachment-0001.htm>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 25 Jan 2010 14:18:19 -0700
> From: David Gobbi <david.gobbi at gmail.com>
> Subject: Re: [vtkusers] flat shading in vtk
> To: Liam Kurmos <quantum.leaf at googlemail.com>
> Cc: vtk <vtkusers at vtk.org>
> Message-ID:
>       <48a17b781001251318u34445487r64207d5dfbe80df3 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Try property->SetInterpolationToFlat().
>
>   David
>
> On Mon, Jan 25, 2010 at 2:05 PM, Liam Kurmos
> <quantum.leaf at googlemail.com> wrote:
> > Is there an easy way to disable shading in vtk?
> > I want all pixels drawn for a polygon to be constant colour,
> > independent of surface normals.
> >
> > I'm going to try having only an emissive color and turning off a
> > lights, but now i'm stuck turning off the default light.
> >
> > ren1->RemoveAllLights();
> >
> > doesn't seem to be having any effect.
> >
> > searches like
> >
> > "site:vtk.org/Wiki/VTK/Examples getLights"
> >
> > are coming up blank, so i wonder if i'm on the right track.
> >
> > any help much appreciated,
> >
> >
> > Liam
> > _______________________________________________
> > 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: 8
> Date: Mon, 25 Jan 2010 16:53:19 -0500
> From: David Doria <daviddoria+vtk at gmail.com>
> Subject: Re: [vtkusers] flat shading in vtk
> Cc: vtk <vtkusers at vtk.org>
> Message-ID:
>       <c19fcadc1001251353j37ff4174j6eb0665104c86169 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Jan 25, 2010 at 4:18 PM, David Gobbi
> <david.gobbi at gmail.com> wrote:
> > Try property->SetInterpolationToFlat().
> >
> > ?David
> >
> > On Mon, Jan 25, 2010 at 2:05 PM, Liam Kurmos
> > <quantum.leaf at googlemail.com> wrote:
> >> Is there an easy way to disable shading in vtk?
> >> I want all pixels drawn for a polygon to be constant colour,
> >> independent of surface normals.
> >>
> >> I'm going to try having only an emissive color and turning off a
> >> lights, but now i'm stuck turning off the default light.
> >>
> >> ren1->RemoveAllLights();
> >>
> >> doesn't seem to be having any effect.
> >>
> >> searches like
> >>
> >> "site:vtk.org/Wiki/VTK/Examples getLights"
> >>
> >> are coming up blank, so i wonder if i'm on the right track.
> >>
> >> any help much appreciated,
> >>
> >>
> >> Liam
> >> _______________________________________________
> >> 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
> >>
>
> As David G. mentioned, you can set the properties of each
> actor, like this:
> http://www.vtk.org/Wiki/VTK/Examples/Visualization/FlatShading
>
> It seemed like Liam was looking for a more global way to turn off
> shading - is anyone familiar with a way to do that?
>
> Thanks,
>
> David D.
>
>
> ------------------------------
>
> Message: 9
> Date: Mon, 25 Jan 2010 14:55:12 -0700
> From: David Gobbi <david.gobbi at gmail.com>
> Subject: Re: [vtkusers] flat shading in vtk
> To: Liam Kurmos <quantum.leaf at googlemail.com>
> Cc: VTK Users <vtkusers at vtk.org>
> Message-ID:
>       <48a17b781001251355gb5d606axca1dc4e324688c5d at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Oh, that's what you meant. Set "Ambient" to 1, and set "Diffuse" and
> "Specular" to 0.  That should completely eliminate all directional
> lighting.
>
>    David
>
>
> On Mon, Jan 25, 2010 at 2:43 PM, Liam Kurmos
> <quantum.leaf at googlemail.com> wrote:
> > On Mon, Jan 25, 2010 at 9:18 PM, David Gobbi
> <david.gobbi at gmail.com> wrote:
> >> Try property->SetInterpolationToFlat().
> >
> > That produced flat shading, but the shading is still
> dependant on the
> > surface normals. (just not interpolated/smoothed like gourad).
> > What i want is a constant colour. Obviously that will mean object
> > won't look very 3d but that is what i want in this case (i want to
> > measure how much area of an object i can see by how many
> pixels of its
> > colour i can count in the render window)
> >
> > I thought property->ShadingOff()/SetShading(0) sounded promising but
> > they don't seem to be having any effect (i have a coloured
> sphere and
> > it still gourad shaded).
> >
> > Also, I managed to turn the lights of with
> > ren1->SetAutomaticLightCreation(0);
> > but then i discovered there isn't an 'emissive color'
> property in vtk.
> >
> > Liam
> >
> >
> >
> >>
> >> ?David
> >>
> >> On Mon, Jan 25, 2010 at 2:05 PM, Liam Kurmos
> >> <quantum.leaf at googlemail.com> wrote:
> >>> Is there an easy way to disable shading in vtk?
> >>> I want all pixels drawn for a polygon to be constant colour,
> >>> independent of surface normals.
> >>>
> >>> I'm going to try having only an emissive color and turning off a
> >>> lights, but now i'm stuck turning off the default light.
> >>>
> >>> ren1->RemoveAllLights();
> >>>
> >>> doesn't seem to be having any effect.
> >>>
> >>> searches like
> >>>
> >>> "site:vtk.org/Wiki/VTK/Examples getLights"
> >>>
> >>> are coming up blank, so i wonder if i'm on the right track.
> >>>
> >>> any help much appreciated,
> >>>
> >>>
> >>> Liam
> >>> _______________________________________________
> >>> 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: 10
> Date: Mon, 25 Jan 2010 17:00:46 -0500
> From: Bill Lorensen <bill.lorensen at gmail.com>
> Subject: Re: [vtkusers] importing image data into VTK from textfile
>       (mimics)
> To: michiel mentink <michael.mentink at st-hughs.ox.ac.uk>
> Cc: vtk <vtkusers at vtk.org>
> Message-ID:
>       <4db4735c1001251400q2c97be82led48649b9c4b905d at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Can you export the data into some sort of image format like DICOM?
>
> On Mon, Jan 25, 2010 at 11:36 AM, michiel mentink
> <michael.mentink at st-hughs.ox.ac.uk> wrote:
> >
> > I'd like to import image data into VTK from a textfile.
> > The file is an exported segmented image, coming from MIMICS.
> >
> > The textfile has this data:
> >
> > 82.5000000000000??? -119.687500000000??? 35.2119100000000??? 251
> > 82.1875000000000??? -119.375000000000??? 35.2119100000000??? 201
> > 82.5000000000000??? -119.375000000000??? 35.2119100000000??? 239
> > 82.8125000000000??? -119.375000000000??? 35.2119100000000??? 226
> > 82.1875000000000??? -119.062500000000??? 35.2119100000000??? 195
> > 82.5000000000000??? -119.062500000000??? 35.2119100000000??? 213
> > 82.8125000000000??? -119.062500000000??? 35.2119100000000??? 201
> > 83.1250000000000??? -119.062500000000??? 35.2119100000000??? 163
> > 82.1875000000000??? -118.750000000000??? 35.2119100000000??? 176
> > 82.5000000000000??? -118.750000000000??? 35.2119100000000??? 176
> > 82.8125000000000??? -118.750000000000??? 35.2119100000000??? 176
> >
> > with values for x, y, z and image intensity.
> >
> > How do I import this data into VTK?
> >
> > I guess I have to read everything into an array first,
> create an empty image
> > and then copy the pixel values into that empty image?
> > How do I set the inter pixel spacing and inter slice spacing?
> >
> > Kind regards,
> >
> > Michael
> >
> > _______________________________________________
> > 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: 11
> Date: Mon, 25 Jan 2010 23:57:16 +0100
> From: Dominik Szczerba <dominik at itis.ethz.ch>
> Subject: Re: [vtkusers] Reading independent Data into VTK
> To: Ryan Bloor <ryanbloor at hotmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <4B5E21CC.8090301 at itis.ethz.ch>
> Content-Type: text/plain; charset=ISO-8859-1
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Ryan,
>
> It is most certainly possible to read such files into VTK
> (esp. if your
> matlab files are hdf5 based), but it will most certainly not be
> frustration free, with the said frustration coming from the incomplete
> documentation/examples/etc. If you are a novice then do get yourself
> prepared for quite some learning curve - or paying quite some
> consulting.
>
> Dominik
>
> Ryan Bloor wrote:
> >  Hi
> >
> > Firstly, thanks for replying.
> >
> > The files are probably from at least version 7, though I am
> unaware of
> > the exact number. They are Matlab files, yes. Does VTK
> support .mat files?
> >
> > My end goal is to visualise a heart in 3D using these .mat files as
> > input. But as a simple test; displaying a 2D image of a
> particular slice
> > would be great. I have managed it in matlab but the problem
> of input and
> > conversion in VTK is holding me back and frustrating me.
> >
> > Any ideas?
> >
> > Regards,
> >
> > Ryan
> >
> >> Date: Sun, 24 Jan 2010 21:29:45 +0100
> >> From: dominik at itis.ethz.ch
> >> To: ryanbloor at hotmail.com
> >> CC: vtkusers at vtk.org
> >> Subject: Re: [vtkusers] Reading independent Data into VTK
> >>
> > What is .mat? Matlab? Which version? The latest are based
> on hdf5, and
> > it would make much more sense to read them in directly, and
> not via text
> > file.
> >
> > Dominik
> >
> > Ryan Bloor wrote:
> >> Hi,
> >
> >> I am torn between which direction to take regarding importing a
> >> particular DT-MRI dataset into VTK. The dataset is split
> into four files
> >> with three representing the primary eigenvectors and the forth the
> >> intensity values. These files are stored in a .mat file format.
> >
> >> Is the most logical solution to convert the files to a
> text file and
> >> then write a conversion script which converts these text
> files to .vtk
> >> files? I have access to the various header information for
> the dataset,
> >> e.g. dimensions, spacing etc...
> >
> >> Or is there another way that I have perhaps overlooked?
> >
> >> Any help would be greatly appreciated.
> >
> >> Kind Regards,
> >
> >> Ryan
> >
> >> Do you have a story that started on Hotmail? Tell us now
> >> <http://clk.atdmt.com/UKM/go/195013117/direct/01/>
> >
> >
> >>
> --------------------------------------------------------------
> ----------
> >
> >> _______________________________________________
> >> 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
> >
>
> > Do you have a story that started on Hotmail? Tell us now
> > <http://clk.atdmt.com/UKM/go/195013117/direct/01/>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkteIcQACgkQ/EBMh9bUuzKHUACeKRWSEIbopwnyf7/PjRRE/tk9
> KhUAnRKfOEGbYRVzIJMogX6E8uQLtrFc
> =dbpw
> -----END PGP SIGNATURE-----
>
>
> ------------------------------
>
> Message: 12
> Date: Tue, 26 Jan 2010 09:42:39 +1000
> From: Allan James <ar.james at qut.edu.au>
> Subject: [vtkusers] VTK Example - AreaPicking
> To: "daviddoria+vtk at gmail.com" <daviddoria+vtk at gmail.com>
> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
> Message-ID:
>
> <AEA55085A767D546B94229C14D2AB241133EB7A4A8 at QUTEXMBX01.qut.edu.au>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi David,
>
> Just a note to say I have got the VTK/Examples/AreaPicking
> example working by replacing the following line:
>
> renderWindowInteractor->AddObserver ( vtkCommand::PickEvent,
> pickCallback );
>
> with:
>
> areaPicker->AddObserver ( vtkCommand::EndPickEvent, pickCallback );
>
> The observer needs to be attached to the picker rather than
> the interactor.
>
> By the way - thanks for all your efforts building up the
> examples - this will help out newbies immensely!
>
> cheers,
>
> Allan James
> IT Specialist | Research Support
> High Performance Computing and Research Support
> Queensland University of Technology
> (07) 3138 9264
> ar.james at qut.edu.au
> http://www.qut.edu.au/its/hpc
>
> >++(((?>  ._.???`?..   >++(((?>  ..???`?._.  >++(((?>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/d3
> 2e053a/attachment-0001.htm>
>
> ------------------------------
>
> Message: 13
> Date: Mon, 25 Jan 2010 21:41:02 -0600
> From: Eric Barn <ebarn100 at gmail.com>
> Subject: Re: [vtkusers] ThinPlatespline issue
> To: vtkusers at vtk.org
> Message-ID:
>       <b457aa021001251941m25b73004h1e234f01c5829ea5 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I mailed a post but looks like it dod not make it to the list.
>
> My goal is to create a surface with nx by ny grid blocks
> using some x, y, z
> data. I am trying to use the ThinPlateSpline. I looked thru
> the Tcl code (ie
> in hybrid floder) but I still am unable to display my results.
>
> It will be very helpful if someone can point me to some other
> existing code.
>
> Thanks.
> -Eric
>
> On Sun, Jan 24, 2010 at 8:49 PM, Eric Barn <ebarn100 at gmail.com> wrote:
>
> > All,
> > I am trying to display some points/Grid using
> ThinPlatespline  as in the
> > code below. But I donot see the map in the viewer. I see
> the same map if I
> > use delauny2D.
> >
> > I really appreciate your help on it.
> >
> > -Eric
> >
> >  // Generate a 10 x 10 grid of points
> > vtkPoints *points = vtkPoints::New();
> > vtkPoints *pointsT = vtkPoints::New();
> >   for(unsigned int x = 0; x < 10; x++)
> >     {
> >     for(unsigned int y = 0; y < 10; y++)
> >       {
> >       points->InsertNextPoint(x + vtkMath::Random(-.250, 0.25),
> >                               y + vtkMath::Random(-.250, 0.25),
> >                               vtkMath::Random(0.0,.50));// 0);
> >       }
> >     }
> >
> >   vtkPolyData *aPolyData = vtkPolyData::New();
> >   aPolyData->SetPoints(points);
> >   vtkThinPlateSplineTransform* tpst =
> vtkThinPlateSplineTransform::New();
> >   tpst->SetSourceLandmarks(points);
> >   tpst->SetBasisToR();
> >   vtkGeneralTransform* tpstconcat = vtkGeneralTransform::New();
> >     tpstconcat->SetInput(tpst);
> >     tpstconcat->Concatenate(tpst->GetInverse());
> >     tpstconcat->Concatenate(tpst);
> >
> >   vtkTransformPolyDataFilter *transformer=
> > vtkTransformPolyDataFilter::New();
> >    transformer->SetInput(aPolyData);
> >   transformer->SetTransform(tpstconcat);//tpst);
> >
> > //  vtkPolyDataMapper *mapperPoly = vtkPolyDataMapper::New();
> >   vtkDataSetMapper *mapperPoly = vtkDataSetMapper::New();
> >   mapperPoly->SetInput(transformer->GetOutput());//outputPolyData);
> >
> >            surfaceActor = vtkActor::New();
> >            surfaceActor->SetMapper(mapperPoly);
> >             vtkWindow1->GetRenderer()->AddActor(surfaceActor);
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100125/85
> 3cdbee/attachment-0001.htm>
>
> ------------------------------
>
> Message: 14
> Date: Tue, 26 Jan 2010 00:01:36 -0800 (PST)
> From: Fireman Fireman <vtkusersneedhelp at yahoo.fr>
> Subject: [vtkusers] Produce an MPEG file from a stack of JPEG image
> To: vtkusers at vtk.org
> Message-ID: <112612.21246.qm at web24818.mail.ird.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear vtkusers,
> ?
> I want to know if VTK provides a solution to produce an MPEG
> file from a stack of JPEG image.
> ?
> Can you provide me in this case a small example (source code
> or steps) ?
> ?
> Thank you in advance
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/a7
> bbc447/attachment-0001.htm>
>
> ------------------------------
>
> Message: 15
> Date: Tue, 26 Jan 2010 11:05:32 +0000
> From: Liam Kurmos <quantum.leaf at googlemail.com>
> Subject: Re: [vtkusers] VTK Example - AreaPicking
> To: vtk <vtkusers at vtk.org>
> Message-ID:
>       <e90a17d21001260305m45a37f94h7f0806746db114c2 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I thought I'd have a look at this example. Running it with the
> vtkInteractorStyleTrackballCamera, I find that if i pick within the
> bounding box of the actor i get a red box around it.
> However if I use vtkInteractorStyleRubberBandPick i don't get the red
> box wherever i drag.
>
> bug?
>
> Liam
>
>
> On Mon, Jan 25, 2010 at 11:42 PM, Allan James
> <ar.james at qut.edu.au> wrote:
> > Hi David,
> >
> > Just a note to say I have got the VTK/Examples/AreaPicking
> example working
> > by replacing the following line:
> >
> > renderWindowInteractor->AddObserver (
> vtkCommand::PickEvent, pickCallback );
> >
> > with:
> >
> > areaPicker->AddObserver ( vtkCommand::EndPickEvent, pickCallback );
> >
> > The observer needs to be attached to the picker rather than
> the interactor.
> >
> > By the way - thanks for all your efforts building up the
> examples - this
> > will help out newbies immensely!
> >
> > cheers,
> >
> > Allan James
> > IT Specialist | Research Support
> > High Performance Computing and Research Support
> > Queensland University of Technology
> > (07) 3138 9264
> > ar.james at qut.edu.au
> > http://www.qut.edu.au/its/hpc
> >
> >>++(((?>? ._.???`?..?? >++(((?>? ..???`?._.? >++(((?>
> > _______________________________________________
> > 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: 16
> Date: Tue, 26 Jan 2010 06:28:09 -0500
> From: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> To: Fireman Fireman <vtkusersneedhelp at yahoo.fr>
> Cc: vtkusers at vtk.org
> Message-ID: <4B5ED1C9.3090008 at ohiou.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 01/26/2010 03:01 AM, Fireman Fireman wrote:
> > Dear vtkusers,
> >
> > I want to know if VTK provides a solution to produce an
> MPEG file from
> > a stack of JPEG image.
> >
> > Can you provide me in this case a small example (source
> code or steps) ?
> >
> > Thank you in advance
> >
> >
>
> First what operating system are you using?
>
> Do you want to load the JPEG images into a volume and do some
> rendering
> for each frame?
>
>    OR
>
> Do you want each frame to just be a copy of one of the JPEG images?
>
> This last is better accomplished with other programs.
>
> I use mencoder :
>   mencoder mf://vol*.png -of mpeg -o tmp.mpeg -ovc lavc -oac copy
>
>
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 261 bytes
> Desc: OpenPGP digital signature
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/62
> 5a4abc/attachment-0001.pgp>
>
> ------------------------------
>
> Message: 17
> Date: Tue, 26 Jan 2010 05:19:28 -0800 (PST)
> From: Fireman Fireman <vtkusersneedhelp at yahoo.fr>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> To: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Cc: vtkusers at vtk.org
> Message-ID: <663335.68808.qm at web24810.mail.ird.yahoo.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello,
> ?
> Thank you very much for your answer.
>
> I'm using XP as operating system and C++/Qt?? for development.
>
> I want to produce an MPEG file that can be read by a video
> player like Windows Media Player.
> ?
> I want to use a stack of JPEG ?images as input and having as
> output a MPEG file
>
> Stack of JPEG ?images? ---------------?>? X
> ---------------------> MPEG file as output.
> ?
> I want to avoid the use of an external program because I want
> to integrate the process of transformation in my project.
> ?
> Thank you in advance
>
> --- En date de?: Mar 26.1.10, Kevin H. Hobbs
> <hobbsk at ohiou.edu> a ?crit?:
>
>
> De: Kevin H. Hobbs <hobbsk at ohiou.edu>
> Objet: Re: [vtkusers] Produce an MPEG file from a stack of JPEG image
> ?: "Fireman Fireman" <vtkusersneedhelp at yahoo.fr>
> Cc: vtkusers at vtk.org
> Date: Mardi 26 Janvier 2010, 11h28
>
>
> On 01/26/2010 03:01 AM, Fireman Fireman wrote:
> > Dear vtkusers,
> >?
> > I want to know if VTK provides a solution to produce an
> MPEG file from
> > a stack of JPEG image.
> >?
> > Can you provide me in this case a small example (source
> code or steps) ?
> >?
> > Thank you in advance
> >
> >
>
> First what operating system are you using?
>
> Do you want to load the JPEG images into a volume and do some
> rendering
> for each frame?
>
> ???OR
>
> Do you want each frame to just be a copy of one of the JPEG images?
>
> This last is better accomplished with other programs.
>
> I use mencoder :
> ? mencoder mf://vol*.png -of mpeg -o tmp.mpeg -ovc lavc -oac copy
>
> ???
>
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/d8
> c85f78/attachment-0001.htm>
>
> ------------------------------
>
> Message: 18
> Date: Tue, 26 Jan 2010 09:41:22 -0500
> From: Bill Lorensen <bill.lorensen at gmail.com>
> Subject: Re: [vtkusers] Infinite recursion in vtkDelaunay2D::CheckEdge
> To: Kenneth Porter <shiva at sewingwitch.com>
> Cc: vtkusers at vtk.org
> Message-ID:
>       <4db4735c1001260641q54394815gd3b9af6a4a3fed93 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Try running CleanPolyData on your polydata before the Delaunay2D
> filter. This will eliminate duplicate points if present.
>
> On Mon, Jan 25, 2010 at 1:33 PM, Kenneth Porter
> <shiva at sewingwitch.com> wrote:
> > I'm converting a point cloud to a surface with
> vtkDelaunay2D and one of my
> > data sets is throwing a Stack Overflow due to runaway recursion in
> > CheckEdge. Is this a known bug? I'm not real familiar with
> the algorithm so
> > I don't know what the termination condition should look
> like. What should be
> > the maximum depth of the stack for a given data set size?
> > _______________________________________________
> > 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: 19
> Date: Tue, 26 Jan 2010 09:42:47 -0500
> From: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> To: Fireman Fireman <vtkusersneedhelp at yahoo.fr>
> Cc: vtkusers at vtk.org
> Message-ID: <4B5EFF67.1070606 at ohiou.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 01/26/2010 08:19 AM, Fireman Fireman wrote:
> > Hello,
> >
> > Thank you very much for your answer.
> >
> > I'm using XP as operating system and C++/Qt   for development.
> >
> > I want to produce an MPEG file that can be read by a video
> player like Windows Media Player.
> >
> > I want to use a stack of JPEG  images as input and having
> as output a MPEG file
> >
> > Stack of JPEG  images  --------------- >  X
> ---------------------> MPEG file as output.
> >
> > I want to avoid the use of an external program because I
> want to integrate the process of transformation in my project.
> >
> > Thank you in advance
> >
> > --
>
> You may find the documentation for the vtkGenericMovieWriter class and
> it's subclasses useful. They can be found here :
>
> http://www.vtk.org/doc/nightly/html/classvtkGenericMovieWriter.html
>
> Using the MPEG2 writer class requires extra work on your part when VTK
> is compiled so you may find it easier to use the AVIWriter class which
> is available on windows builds of VTK.
>
> Since I always just write image files to disk with and encode
> them to a
> movie file later, I can not help you with these classes.
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 252 bytes
> Desc: OpenPGP digital signature
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/a8
> 6f5b52/attachment-0001.pgp>
>
> ------------------------------
>
> Message: 20
> Date: Tue, 26 Jan 2010 10:20:24 -0500
> From: David Doria <daviddoria+vtk at gmail.com>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> Cc: vtkusers at vtk.org
> Message-ID:
>       <c19fcadc1001260720o1a7107eehefb25b7844cbf50c at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Tue, Jan 26, 2010 at 9:42 AM, Kevin H. Hobbs
> <hobbsk at ohiou.edu> wrote:
>
> > On 01/26/2010 08:19 AM, Fireman Fireman wrote:
> > > Hello,
> > >
> > > Thank you very much for your answer.
> > >
> > > I'm using XP as operating system and C++/Qt   for development.
> > >
> > > I want to produce an MPEG file that can be read by a
> video player like
> > Windows Media Player.
> > >
> > > I want to use a stack of JPEG  images as input and having
> as output a
> > MPEG file
> > >
> > > Stack of JPEG  images  --------------- >  X
> ---------------------> MPEG
> > file as output.
> > >
> > > I want to avoid the use of an external program because I want to
> > integrate the process of transformation in my project.
> > >
> > > Thank you in advance
> > >
> > > --
> >
> > You may find the documentation for the
> vtkGenericMovieWriter class and
> > it's subclasses useful. They can be found here :
> >
> > http://www.vtk.org/doc/nightly/html/classvtkGenericMovieWriter.html
> >
> > Using the MPEG2 writer class requires extra work on your
> part when VTK
> > is compiled so you may find it easier to use the AVIWriter
> class which
> > is available on windows builds of VTK.
> >
> > Since I always just write image files to disk with and
> encode them to a
> > movie file later, I can not help you with these classes.
> >
> >
> >
> >
> Fireman,
>
> I can't test this as I'm not on Windows, but looking at the
> test for this
> class, it looks like something like this may work:
>
> http://www.vtk.org/Wiki/VTK/Examples/Video/AVI
>
> I use mencoder like Kevin mentioned, so I've never tried
> anything like this
> in VTK before.
>
> Let us know if you try it and if it works.
>
> Thanks,
>
> David
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/3e
> f3b254/attachment-0001.htm>
>
> ------------------------------
>
> Message: 21
> Date: Tue, 26 Jan 2010 08:27:28 -0700
> From: Trevor Irons <trevorirons at gmail.com>
> Subject: [vtkusers] vtkXYPlotActor ReverseAxis
> To: vtkusers at vtk.org
> Message-ID:
>       <cc4dc8ca1001260727k43746c18kca32cc3cdcb9ad67 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Sorry if this has been hashed over before, but I coudn't find
> it. I found
> the same question years ago, but no resolution. I want to
> invert the axis of
> a 2D plot, and corresponding plot. But the call to
> SetReverseYAxis(), just
> inverts the labels and axis. The plots themselves remain
> uninverted, and now
> no longer match the labels. This is not what I was expecting.
>
> Is there a way to reverse the plots themselves? I could do a
> hack and just
> reverse the order in the input data objects, but if they are
> not regularly
> sampled, this will break (I have multiple inputs). It also
> seems strange to
> have to do this. It seems to me that you should be able to do
> this at the
> XYPlotActor level. Any ideas or insight?
>
> Thanks,
>
> -Trevor
>
>     vtkXYPlotActor *_plot = vtkXYPlotActor::New();
>         _plot->AddDataObjectInput(_dataObject);
>         _plot->AddDataObjectInput(_dataObject2);
>         _plot->SetXValuesToValue();
>         _plot->SetReverseYAxis(1);  // Just flips axis, not plots
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/e5
> c90ab2/attachment-0001.htm>
>
> ------------------------------
>
> Message: 22
> Date: Tue, 26 Jan 2010 07:57:57 -0800
> From: Kenneth Porter <shiva at sewingwitch.com>
> Subject: Re: [vtkusers] Infinite recursion in vtkDelaunay2D::CheckEdge
> To: vtkusers at vtk.org
> Message-ID: <4531034659AE63AD55832219@[10.0.0.199]>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> --On Monday, January 25, 2010 10:33 AM -0800 Kenneth Porter
> <shiva at sewingwitch.com> wrote:
>
> > I'm converting a point cloud to a surface with
> vtkDelaunay2D and one of
> > my data sets is throwing a Stack Overflow due to runaway
> recursion in
> > CheckEdge. Is this a known bug? I'm not real familiar with
> the algorithm
> > so I don't know what the termination condition should look
> like. What
> > should be the maximum depth of the stack for a given data set size?
>
> It turned out that I was misinterpreting my raw data, and had
> a zero X
> coordinate at all positions, leading to the point cloud just
> being a line.
>
> Shouldn't the Delaunay2D filter catch singularities like this
> and throw an
> exception?
>
>
>
>
> ------------------------------
>
> Message: 23
> Date: Tue, 26 Jan 2010 15:59:09 +0000 (GMT)
> From: Malsoaz James <jmalsoaz at yahoo.fr>
> Subject: [vtkusers] vtkDataArray: Memory allocation problem
> To: vtkusers at vtk.org
> Message-ID: <241459.90509.qm at web28305.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> First of all, I would like to expose the context of my
> problem. I'm working on an application which is in charge of
> loading/building a 3D volume from Dicom files. The building
> of the 3D volume is working perfectly using a vtkIntArray and
> setScalars().
>
>
> Unfortunately, later in the software, I need to rebuild a new
> 3D volume using one more time vtkIntArray with the same size
> but I got an error like: vtkIntArray: Unable to allocate X
> elements of size 4. Although I have enough memory (I have 3Go
> of RAM), I'm doing exactly the same thing as the first build
> and the charge on Windows for the application is always under
> 1Go. My application is working with small volume (ie 150
> slices) and I got this allocation error with big volume (ie
> more than 300 slices).
> For information, the images have a size of 512*512.
>
> Do you know what is the origin of the problem? How can I solve this ?
>
>
> Best
> James
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/7b
> 47fed8/attachment-0001.htm>
>
> ------------------------------
>
> Message: 24
> Date: Tue, 26 Jan 2010 11:10:34 -0500
> From: Bill Lorensen <bill.lorensen at gmail.com>
> Subject: Re: [vtkusers] vtkDataArray: Memory allocation problem
> To: Malsoaz James <jmalsoaz at yahoo.fr>
> Cc: vtkusers at vtk.org
> Message-ID:
>       <4db4735c1001260810k6b84437fv31ef4e84c3404f28 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Are there other filters involved in the processing? What does your vtk
> pipeline look like?
>
> On Tue, Jan 26, 2010 at 10:59 AM, Malsoaz James
> <jmalsoaz at yahoo.fr> wrote:
>
> > Hello,
> >
> > First of all, I would like to expose the context of my
> problem. I'm working
> > on an application which is in charge of loading/building a
> 3D volume from
> > Dicom files. The building of the 3D volume is working
> perfectly using a
> > vtkIntArray and setScalars().
> >
> >
> > Unfortunately, later in the software, I need to rebuild a
> new 3D volume
> > using one more time vtkIntArray with the same size but I
> got an error like:
> > vtkIntArray: Unable to allocate X elements of size 4.
> Although I have enough
> > memory (I have 3Go of RAM), I'm doing exactly the same
> thing as the first
> > build and the charge on Windows for the application is
> always under 1Go. My
> > application is working with small volume (ie 150 slices)
> and I got this
> > allocation error with big volume (ie more than 300 slices).
> > For information, the images have a size of 512*512.
> >
> > Do you know what is the origin of the problem? How can I
> solve this ?
> >
> >
> > Best
> > James
> >
> >
> > _______________________________________________
> > 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/20100126/7f
> f38404/attachment-0001.htm>
>
> ------------------------------
>
> Message: 25
> Date: Tue, 26 Jan 2010 11:10:26 -0500
> From: "Kevin H. Hobbs" <hobbsk at ohiou.edu>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> To: David Doria <daviddoria+vtk at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <4B5F13F2.40705 at ohiou.edu>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 01/26/2010 10:20 AM, David Doria wrote:
> >
> > http://www.vtk.org/Wiki/VTK/Examples/Video/AVI
> >
>
> Gaaaa! I looked for this and couldn't find a link from the wiki nor
> could I find it with a google search.
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: signature.asc
> Type: application/pgp-signature
> Size: 252 bytes
> Desc: OpenPGP digital signature
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/e2
> 32a182/attachment-0001.pgp>
>
> ------------------------------
>
> Message: 26
> Date: Tue, 26 Jan 2010 17:36:53 +0100
> From: Lars Bilke <lars.bilke at ufz.de>
> Subject: [vtkusers] Windows: Correctly linking the debug and release
>       libraries in a CMake-based project
> To: vtkusers at vtk.org
> Message-ID: <4B5F1A25.7030903 at ufz.de>
> Content-Type: text/plain; charset=UTF-8
>
> Hi vtk users,
>
> I want to use VTK in a large multiplatform (Win, Linux, Mac) project.
> The projects build configution is driven by CMake. Under
> windows VTK is
> not really usable with CMake for me:
>
> When I built VTK from source with the help of CMake and Visual Studio
> and built the INSTALL target I can only install one
> configuration: debug
> OR release because of the identical naming of the debug and
> release libs.
> Because I also Qt the following issue also occurs:
>
> http://www.itk.org/Wiki/VTK_FAQ#Shared_builds_of_VTK_and_debug
> ging_QVTKWidget_using_Visual_Studio
>
> On the VTK-FAQ page a manual workaround for this problem is given but
> the workaround is not "the CMake-way"-like.
>
> Sure, if I don?t install vtk through the install target and don?t use
> find_package(VTK) and INCLUDE( ${VTK_USE_FILE} ) I can set all the
> include and linker paths to the paths where I built VTK manually in my
> project but that is not a convenient solution.
>
> I know that this problem was already discussed here on the list but no
> good solution was given.
>
> So can someone with more insight in VTKs CMake internals help me out?
>
> Thanks!!
>
> --
> Mit freundlichen Gr??en
>
> Lars Bilke
>
> Visualisierungszentrum / Umweltinformatik
>
> Helmholtz-Zentrum f?r Umweltforschung GmbH - UFZ
> Permoserstra?e 15, 04318 Leipzig
> Telefon: +49 (0)341 235-1881
> Email:   lars.bilke at ufz.de
>
> http://www.ufz.de/index.php?en=14171
>
>
>
>
> ------------------------------
>
> Message: 27
> Date: Tue, 26 Jan 2010 11:40:46 -0500
> From: David Doria <daviddoria+vtk at gmail.com>
> Subject: Re: [vtkusers] Produce an MPEG file from a stack of JPEG
>       image
> Cc: vtkusers at vtk.org
> Message-ID:
>       <c19fcadc1001260840k26cb96fi3ff3b039b83d0c26 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Tue, Jan 26, 2010 at 11:10 AM, Kevin H. Hobbs
> <hobbsk at ohiou.edu> wrote:
>
> > On 01/26/2010 10:20 AM, David Doria wrote:
> > >
> > > http://www.vtk.org/Wiki/VTK/Examples/Video/AVI
> > >
> >
> > Gaaaa! I looked for this and couldn't find a link from the wiki nor
> > could I find it with a google search.
> >
> >
> I just put it there :)
>
> Thanks,
>
> David
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/53
> fb8179/attachment-0001.htm>
>
> ------------------------------
>
> Message: 28
> Date: Tue, 26 Jan 2010 11:42:30 -0500
> From: John Drescher <drescherjm at gmail.com>
> Subject: Re: [vtkusers] Windows: Correctly linking the debug and
>       release libraries in a CMake-based project
> To: Lars Bilke <lars.bilke at ufz.de>
> Cc: vtkusers at vtk.org
> Message-ID:
>       <387ee2021001260842l2abf9e6epb2edf5a9bda99721 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Jan 26, 2010 at 11:36 AM, Lars Bilke
> <lars.bilke at ufz.de> wrote:
> > Hi vtk users,
> >
> > I want to use VTK in a large multiplatform (Win, Linux,
> Mac) project.
> > The projects build configution is driven by CMake. Under
> windows VTK is
> > not really usable with CMake for me:
> >
> > When I built VTK from source with the help of CMake and
> Visual Studio
> > and built the INSTALL target I can only install one
> configuration: debug
> > OR release because of the identical naming of the debug and
> release libs.
> > Because I also Qt the following issue also occurs:
> >
> >
> http://www.itk.org/Wiki/VTK_FAQ#Shared_builds_of_VTK_and_debug
> ging_QVTKWidget_using_Visual_Studio
> >
> > On the VTK-FAQ page a manual workaround for this problem is
> given but
> > the workaround is not "the CMake-way"-like.
> >
> > Sure, if I don?t install vtk through the install target and
> don?t use
> > find_package(VTK) and INCLUDE( ${VTK_USE_FILE} ) I can set all the
> > include and linker paths to the paths where I built VTK
> manually in my
> > project but that is not a convenient solution.
> >
> > I know that this problem was already discussed here on the
> list but no
> > good solution was given.
> >
> > So can someone with more insight in VTKs CMake internals
> help me out?
> >
>
> When you build VTK using CMake the .lib .dll may have the same name
> but they are in different folders. CMake understands this and will
> properly link your application with the correct .lib. This happens if
> you do build both debug and release vtk.
>
> John
>
>
> ------------------------------
>
> Message: 29
> Date: Tue, 26 Jan 2010 11:45:58 -0500
> From: Michael Jackson <mike.jackson at bluequartz.net>
> Subject: Re: [vtkusers] Windows: Correctly linking the debug and
>       release libraries in a CMake-based project
> To: VTK Users <vtkusers at vtk.org>
> Message-ID: <6CC719ED-A4FD-44F7-A5E0-768E7912B7A6 at bluequartz.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
>
>
> On Jan 26, 2010, at 11:42 AM, John Drescher wrote:
>
> > On Tue, Jan 26, 2010 at 11:36 AM, Lars Bilke <lars.bilke at ufz.de>
> > wrote:
> >> Hi vtk users,
> >>
> >> I want to use VTK in a large multiplatform (Win, Linux,
> Mac) project.
> >> The projects build configution is driven by CMake. Under windows
> >> VTK is
> >> not really usable with CMake for me:
> >>
> >> When I built VTK from source with the help of CMake and
> Visual Studio
> >> and built the INSTALL target I can only install one
> configuration:
> >> debug
> >> OR release because of the identical naming of the debug
> and release
> >> libs.
> >> Because I also Qt the following issue also occurs:
> >>
> >>
> http://www.itk.org/Wiki/VTK_FAQ#Shared_builds_of_VTK_and_debug
> ging_QVTKWidget_using_Visual_Studio
> >>
> >> On the VTK-FAQ page a manual workaround for this problem
> is given but
> >> the workaround is not "the CMake-way"-like.
> >>
> >> Sure, if I don?t install vtk through the install target
> and don?t use
> >> find_package(VTK) and INCLUDE( ${VTK_USE_FILE} ) I can set all the
> >> include and linker paths to the paths where I built VTK
> manually in
> >> my
> >> project but that is not a convenient solution.
> >>
> >> I know that this problem was already discussed here on the
> list but
> >> no
> >> good solution was given.
> >>
> >> So can someone with more insight in VTKs CMake internals
> help me out?
> >>
> >
> > When you build VTK using CMake the .lib .dll may have the same name
> > but they are in different folders. CMake understands this and will
> > properly link your application with the correct .lib. This
> happens if
> > you do build both debug and release vtk.
> >
> > John
>
> I think he is talking about having the vtk libs have "_debug"
> or "_D"
> or "D" in the name when they are built as debug versus
> Release builds.
> What works for ITK is to actually build both the debug and release
> versions but DO NOT install them. Then set an environment variable
> VTK_DIR to point to the build directory of VTK. CMake will do the
> rest. This at least worked for me with ITK and allowed me to switch
> between debug and release builds in my own project without
> getting all
> the linker warnings/errors in MSVC. The other suggestion was
> to build
> "Release W/Debug Info" and install that.
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
>
>
>
> ------------------------------
>
> Message: 30
> Date: Tue, 26 Jan 2010 17:53:25 +0100
> From: "toulgen" <toulgen at gmail.com>
> Subject: Re: [vtkusers] Extract a curvilinear slice of volume
> To: "'Bill Lorensen'" <bill.lorensen at gmail.com>,      "'David Gobbi'"
>       <david.gobbi at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <000901ca9ea8$17992fd0$a500a8c0 at olympe.local>
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Hi-vtkusers,
>
> After some trial weeks I am always blocked.
> I tried to extract the curvilinear plan with using the
> vtkPlanes class but
> that does not give good result.
>
> David/Bill can you give me more details concerning your suggestion.
> Have you an example?
>
> Thank you very much
>
> ToulGen
>
>
> -----Message d'origine-----
> De?: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Envoy??: mercredi 16 d?cembre 2009 18:59
> ??: David Gobbi
> Cc?: toulgen; vtkusers at vtk.org
> Objet?: Re: [vtkusers] Extract a curvilinear slice of volume
>
> I have used 2) many times. Try it, you'll like it.
>
> Bill
>
> On Wed, Dec 16, 2009 at 12:15 PM, David Gobbi
> <david.gobbi at gmail.com> wrote:
> > It's not an easy thing to do. ?Here's are possible methods:
> >
> >
> > 1) If you want the result to be an "image", then do the following:
> >
> > Create a grid (i.e. a vtkImageData) of scalar type "float" and 3
> > scalar components. ?Set the extent, origin, and position to be the
> > same as that of the slice that you want to display.
> >
> > Populate the grid with vectors that go from the voxel positions in
> > your slice (i.e. flat space) to the corresponding voxel
> position that
> > you want to interpolate from in the original image (i.e.
> the position
> > along your curved surface).
> >
> > You can use this grid to make a vtkGridTransform, and you
> can use the
> > GridTransform in the SetTransform() method of vtkImageReslice.
> >
> >
> > 2) If you don't care what the data type of the output will
> be, you can
> > make a colored polydata surface as follows:
> >
> > Create a polydata surface mesh i.e. create the geometry of
> the surface
> > that you wish to extract. ?Use very small polygons, i.e.
> the polygons
> > should be about the same size as your pixels.
> >
> > Use vtkProbeFilter to probe your volume and set the scalars of the
> > surface mesh. ?Before doing this, you should convert the
> image to RGB
> > with vtkImageMapToColors.
> >
> >
> > Good luck, I've never tried these methods myself but there is no
> > reason why they shouldn't work.
> >
> > ? ?David
> >
> >
> > On Wed, Dec 16, 2009 at 9:01 AM, toulgen <toulgen at gmail.com> wrote:
> >>
> >> Hi vtk-users,
> >>
> >> To extract the axial, the coronal and the sagittal slice I use the
> >> vtkImageReslice class.
> >>
> >> I want to extract a curvilinear slice of volume?
> >>
> >> What is class I can use?
> >>
> >> Thx
> > _______________________________________________
> > 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 embedded and charset-unspecified text was scrubbed...
> Name: code.cpp
> URL:
> <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/7a
> 5ae989/attachment-0001.txt>
>
> ------------------------------
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
> End of vtkusers Digest, Vol 69, Issue 36
> ****************************************
>



More information about the vtkusers mailing list