[vtkusers] Curved reformation using imageslicemapper

rahul indoria rahulindoria5 at gmail.com
Fri Jul 5 09:40:25 EDT 2013


Hi,
   Hi,
   I want to use the application of example (
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageSliceMapper) in
example  (
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvedReformation)
but when i trying to modifying this, i am getting certain errors. I am
writing my modifying code(in curved reformation example), could you please
tell me the mistakes which i am doing in that. this code is the modified
code of curved reformation example using the code of image slice mapper.


*  // Probe the volume with the extruded surface*
*  vtkSmartPointer<vtkProbeFilter> sampleVolume =*
*    vtkSmartPointer<vtkProbeFilter>::New();*
* // sampleVolume->SetInputConnection(1, imageReader->GetOutputPort());*
*
*
*#if VTK_MAJOR_VERSION <= 5*
*  sampleVolume->SetInput(0, surface);*
* #else*
*  sampleVolume->SetInputData(0, surface);*
*#endif*
*
*
*/**
*  // Compute a simple window/level based on scalar range*
*  vtkSmartPointer<vtkWindowLevelLookupTable> wlLut =*
*    vtkSmartPointer<vtkWindowLevelLookupTable>::New();*
*  double range = imageReader->GetOutput()->GetScalarRange()[1] -*
*                 imageReader->GetOutput()->GetScalarRange()[0];*
*  double level = (imageReader->GetOutput()->GetScalarRange()[1] +*
*                  imageReader->GetOutput()->GetScalarRange()[0]) / 2.0;*
*  wlLut->SetWindow(range);*
*  wlLut->SetLevel(level);*
* */*
*
*
*  //Reslicing *
*  vtkSmartPointer<vtkImageResliceMapper> imageResliceMapper =
vtkSmartPointer<vtkImageResliceMapper>::New();*
*#if VTK_MAJOR_VERSION <= 5*
*  imageResliceMapper->SetInputConnection(1, sampleVolume->GetOutputPort());
*
*#else*
*  imageResliceMapper->SetInputData(sampleVolume->GetOutputPort());*
*#endif*
* *
*  vtkSmartPointer<vtkImageSlice> imageSlice =
vtkSmartPointer<vtkImageSlice>::New();*
*  imageSlice->SetMapper(imageResliceMapper);*
*
*
*/*  // Create a mapper.*
*  vtkSmartPointer<vtkDataSetMapper> mapper =*
*    vtkSmartPointer<vtkDataSetMapper>::New();*
*  mapper->SetInputConnection(sampleVolume->GetOutputPort());*
*  mapper->SetLookupTable(wlLut);*
*  mapper->SetScalarRange(0, 255);*
* *
*  // Create An Actor*
*  vtkSmartPointer<vtkActor> actor =*
*    vtkSmartPointer<vtkActor>::New();*
*  actor->SetMapper(mapper);*
**/*
*
*
*  // Create a renderer,*
*  vtkSmartPointer<vtkRenderer> renderer =*
*    vtkSmartPointer<vtkRenderer>::New();*
*
*
*  // Create render window*
*  vtkSmartPointer<vtkRenderWindow> renderWindow =*
*    vtkSmartPointer<vtkRenderWindow>::New();*
*  renderWindow->AddRenderer(renderer);*
*
*
*
*
*  //Create an  interactor*
*  vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =*
*    vtkSmartPointer<vtkRenderWindowInteractor>::New();*
*  renderWindowInteractor->SetRenderWindow(renderWindow);*
* *
*  // Add the actors to the scene*
*  renderer->AddActor(imageSlice);*
*  renderer->SetBackground(.2, .3, .4);*
* *
*  // Set the camera for viewing medical images*
*  renderer->GetActiveCamera()->SetViewUp(0,0,1);*
*  renderer->GetActiveCamera()->SetPosition(0,0,0);*
*  renderer->GetActiveCamera()->SetFocalPoint(0,1,0);*
*  renderer->ResetCamera();*
* *
*  // Render and interact*
*  renderWindow->Render();*
*  renderWindowInteractor->Start();*
* *
*  imageReader->Delete();*
*  return EXIT_SUCCESS;*



Looking forward your reply soon.

rahul indoria









On Fri, Jul 5, 2013 at 2:57 PM, rahul indoria <rahulindoria5 at gmail.com>wrote:

> Hi,
>    I want to use the application of example (
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageSliceMapper) in
> example  (
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CurvedReformation)
> but when i trying to modifying this, i am getting certain errors. I am
> attaching my modifying code with this mail, could you please tell me the
> mistakes which i am doing in that.
>
> Looking forward your reply soon.
>
> rahul indoria
>
>
>
>
>
>
>
> On Thu, Jul 4, 2013 at 6:00 PM, <vtkusers-request at vtk.org> wrote:
>
>> 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. How do I render a volume from an UnstructuredGrid? (Ruff)
>>    2. Re: vtkButtonSource?vtkRectangularButtonSource
>>       ?vtkEllipticalButtonSource (louiskoo)
>>    3. Re: Problem in an example (Shawn Waldon)
>>    4. Re: Contouring Irregular Points (David E DeMarle)
>>    5. Re: Contouring Irregular Points (Michael Jackson)
>>    6. Re: Contouring Irregular Points (David E DeMarle)
>>    7. Re: How do I render a volume from an UnstructuredGrid? (Ruff)
>>    8. How to use vtkButtonWidget.AddObserver() (louiskoo)
>>    9. Re: vtkButtonSource?vtkRectangularButtonSource
>>       ?vtkEllipticalButtonSource (mirko heuegger)
>>   10. Vtk 6.0 dotnet (Domenico Quaranta)
>>   11. Is it possible to make an image slice of unstructured     grid?
>> (Ruff)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Thu, 4 Jul 2013 06:21:02 -0700 (PDT)
>> From: Ruff <albin.nilsson at gmail.com>
>> Subject: [vtkusers] How do I render a volume from an UnstructuredGrid?
>> To: vtkusers at vtk.org
>> Message-ID: <1372944062789-5721766.post at n5.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> I've created an unstructured grid and would like to volume render it's
>> scalar
>> values, but nothing is rendered.
>> It seems like it is calculating the space I've specified but I cannot see
>> anything. Like I'm missing some small obvious thing.
>>
>> I also tried setting a function to the mapper (Not that I know exactly
>> what
>> it does) but it doesn't seem to do anything.
>>
>> /I know that my current dataset could easily be used as structuredPoints,
>> but I am planning to use a more arbitrary structure for the datafiles./
>>
>> The code is as follows:
>> #!/usr/bin/env python
>>
>> import math
>> from random import*
>> from vtk import*
>>
>> #------------------------------------------------------------------#
>> # Just generating a pretty pattern                                 #
>> #------------------------------------------------------------------#
>> cubeSize = 40
>> atomIndex = 0
>> coordinates = vtk.vtkPoints()
>> scalars = vtk.vtkFloatArray()
>>
>> for z in range(0,cubeSize):
>>         for y in range(0,cubeSize):
>>                 for x in range(0,cubeSize):
>>                         distX = abs(cubeSize/2 - x)
>>                         distY = abs(cubeSize/2 - y)
>>                         distZ = abs(cubeSize/2 - z)
>>                         dist = math.sqrt(distX*distX + distY*distY +
>> distZ*distZ)
>>
>>                         coordinates.InsertPoint(atomIndex, x, y, z)
>>                         scalars.InsertValue(atomIndex,
>> abs(math.cos(dist*.1)*255))
>> #------------------------------------------------------------------#
>> # Done generating pretty pattern                                   #
>> #------------------------------------------------------------------#
>>
>> #Setting up scalar grid
>> ScalarGrid = vtk.vtkUnstructuredGrid()
>> ScalarGrid.SetPoints(coordinates)
>> ScalarGrid.GetPointData().SetScalars(scalars)
>>
>> #------------------------------------------------------------------#
>> # Fixing a bunch of volume properties                              #
>> #------------------------------------------------------------------#
>> # Scalars (0-255) mapped to transparency
>> opacity = vtk.vtkPiecewiseFunction()
>> opacity.AddPoint(150, 0)
>> opacity.AddPoint(255, 1)
>>
>> # Scalars (0-255) mapped to colors
>> colors = vtk.vtkColorTransferFunction()
>> colors.AddRGBPoint(0,1,1,1)
>> colors.AddRGBPoint(230,0,1,0)
>> colors.AddRGBPoint(250,1,0,0)
>>
>> # Colors and opacity goes into a property, along with some fancy stuff
>> volumeProperty = vtk.vtkVolumeProperty()
>> volumeProperty.SetColor(colors)
>> volumeProperty.SetScalarOpacity(opacity)
>> volumeProperty.ShadeOn()
>> volumeProperty.SetInterpolationTypeToLinear()
>>
>> #------------------------------------------------------------------#
>> # End of volume properties                                         #
>> #------------------------------------------------------------------#
>>
>> # Mapping the grid
>> volumeMapper = vtkUnstructuredGridVolumeRayCastMapper()
>> volumeMapper.SetInput(ScalarGrid)
>> #This seems to do nothing at all
>> Function = vtk.vtkUnstructuredGridBunykRayCastFunction()
>> volumeMapper.SetRayCastFunction(Function)
>>
>> # Volume using the mapper
>> volume = vtk.vtkVolume()
>> volume.SetMapper(volumeMapper)
>> volume.SetProperty(volumeProperty)
>>
>> # Standard renderer, render window and interactor
>> ren = vtk.vtkRenderer()
>> ren.AddVolume(volume)
>> ren.SetBackground(1, 1, 1)
>>
>> # =======THIS IS WRITTEN ONLY TO SEE THAT SOMETHING IS RENDERED=======
>> cylinder = vtkCylinderSource()
>> cylinderMapper = vtkPolyDataMapper()
>> cylinderMapper.SetInput(cylinder.GetOutput())
>> cylinderActor = vtkActor()
>> cylinderActor.SetMapper(cylinderMapper)
>> ren.AddActor(cylinderActor)
>> # =====================================================================
>>
>> renWin = vtk.vtkRenderWindow()
>> renWin.AddRenderer(ren)
>> renWin.SetSize(600, 600)
>>
>> iren = vtk.vtkRenderWindowInteractor()
>> iren.SetRenderWindow(renWin)
>> iren.Initialize()
>> iren.Start()
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/How-do-I-render-a-volume-from-an-UnstructuredGrid-tp5721766.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Thu, 4 Jul 2013 06:28:47 -0700 (PDT)
>> From: louiskoo <419655660 at qq.com>
>> Subject: Re: [vtkusers] vtkButtonSource?vtkRectangularButtonSource
>>         ?vtkEllipticalButtonSource
>> To: vtkusers at vtk.org
>> Message-ID: <1372944527281-5721767.post at n5.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Yes,I have taken your suggstion.
>>
>>   vtkButtonWidget buttonWidget = vtkButtonWidget.New();
>>             vtkRenderWindowInteractor renderInteractor =
>> renderWindowControl1.RenderWindow.GetInteractor();
>>             renderInteractor.LeftButtonPressEvt += new
>> vtkObject.vtkObjectEventHandler(renderInteractor_LeftButtonPressEvt);
>>             buttonWidget.SetInteractor(renderInteractor);
>>             buttonWidget.SetRepresentation(rep);
>>             //buttonWidget.LeftButtonPressEvt += new
>> vtkObject.vtkObjectEventHandler(buttonWidget_LeftButtonPressEvt);
>>             buttonWidget.On();
>>
>> But the result is that the buttonWidget has no effect when I click the
>> buttonWidget .
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/vtkButtonSource-vtkRectangularButtonSource-vtkEllipticalButtonSource-tp5721752p5721767.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Thu, 4 Jul 2013 09:29:14 -0400
>> From: Shawn Waldon <swaldon at cs.unc.edu>
>> Subject: Re: [vtkusers] Problem in an example
>> To: rahul indoria <rahulindoria5 at gmail.com>
>> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID:
>>         <CAKqg6a5sy8M=BsiA=
>> L8TiGzOsAr-wK_NEVzxmPB6HwkCC8L8Ng at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Rahul,
>>
>> It looks like you may be building against an older version of VTK.
>>  SetInputData was not added until VTK 6, so if you are using VTK 5 (or
>> accidentally using the wrong header files), that is why you are getting
>> the
>> message.  If you just want to modify the code, you could change it to
>> SetInput instead (the VTK 5 and previous method used for the same
>> purpose).
>>  The methods are slightly different (see
>> http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput), but
>> for the purposes of this example they are the same.
>>
>> HTH,
>>
>> Shawn
>>
>>
>> On Thu, Jul 4, 2013 at 8:58 AM, rahul indoria <rahulindoria5 at gmail.com
>> >wrote:
>>
>> > Hi,
>> >     when i am running this code, this example(
>> >
>> http://vtk.org/gitweb?p=VTK.git;a=blob_plain;f=Examples/DataManipulation/Cxx/Arrays.cxx
>> >  ) *showing an error :  'SetInputData'* : is not a member of
>> > 'vtkPolyDataMapper', but when i am checking this class, this class has
>> this
>> > member function, could you please tell me, why i am getting this
>>  example?
>> >
>> >
>> > Looking forward your reply.
>> > rahul indoria
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>> --
>> Shawn Waldon
>> Graduate Student
>> Department of Computer Science
>> University of North Carolina at Chapel Hill
>> swaldon at cs.unc.edu
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130704/42a9508f/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Thu, 4 Jul 2013 09:53:49 -0400
>> From: David E DeMarle <dave.demarle at kitware.com>
>> Subject: Re: [vtkusers] Contouring Irregular Points
>> To: Michael Jackson <mike.jackson at bluequartz.net>
>> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID:
>>         <
>> CANjZAi-7DJaKp7G6eWSynHP8tv06NWXapn1HOKEtqoZHuhOJKw at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> pointset->delauney->contour
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>> On Thu, Jul 4, 2013 at 8:06 AM, Michael Jackson <
>> mike.jackson at bluequartz.net
>> > wrote:
>>
>> > Can VTK create a contour plot of "irregular" points? What I mean is
>> that I
>> > have a bunch of X,Y + intensity points but the X,Y points are NOT on a
>> > regular grid they are just "Point Data". A collaborator of mine uses
>> IDL to
>> > produce some plots from this data and I would like to use VTK for my own
>> > projects.
>> >
>> > Thanks for any help.
>> > ___________________________________________________________
>> > Mike Jackson                    Principal Software Engineer
>> > BlueQuartz Software                            Dayton, Ohio
>> > mike.jackson at bluequartz.net              www.bluequartz.net
>> >
>> > _______________________________________________
>> > 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/20130704/42dede44/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 5
>> Date: Thu, 4 Jul 2013 09:56:03 -0400
>> From: Michael Jackson <mike.jackson at bluequartz.net>
>> Subject: Re: [vtkusers] Contouring Irregular Points
>> To: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID: <B3832DE6-FA1D-463A-AED1-38D8FCE74818 at bluequartz.net>
>> Content-Type: text/plain; charset=iso-8859-1
>>
>> Is that available in ParaView by any chance?
>> ___________________________________________________________
>> Mike Jackson                    Principal Software Engineer
>>
>>
>> On Jul 4, 2013, at 9:53 AM, David E DeMarle <dave.demarle at kitware.com>
>> wrote:
>>
>> > pointset->delauney->contour
>> >
>> > David E DeMarle
>> > Kitware, Inc.
>> > R&D Engineer
>> > 21 Corporate Drive
>> > Clifton Park, NY 12065-8662
>> > Phone: 518-881-4909
>> >
>> >
>> > On Thu, Jul 4, 2013 at 8:06 AM, Michael Jackson <
>> mike.jackson at bluequartz.net> wrote:
>> > Can VTK create a contour plot of "irregular" points? What I mean is
>> that I have a bunch of X,Y + intensity points but the X,Y points are NOT on
>> a regular grid they are just "Point Data". A collaborator of mine uses IDL
>> to produce some plots from this data and I would like to use VTK for my own
>> projects.
>> >
>> > Thanks for any help.
>> > ___________________________________________________________
>> > Mike Jackson                    Principal Software Engineer
>> > BlueQuartz Software                            Dayton, Ohio
>> > mike.jackson at bluequartz.net              www.bluequartz.net
>> >
>> > _______________________________________________
>> > 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: 6
>> Date: Thu, 4 Jul 2013 09:59:59 -0400
>> From: David E DeMarle <dave.demarle at kitware.com>
>> Subject: Re: [vtkusers] Contouring Irregular Points
>> To: Michael Jackson <mike.jackson at bluequartz.net>
>> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID:
>>         <
>> CANjZAi8xqxORavJR+MaXzeNWEBDaTYfEAZgO5u3RLRBSwZAF8Q at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> yes
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>>
>> On Thu, Jul 4, 2013 at 9:56 AM, Michael Jackson <
>> mike.jackson at bluequartz.net
>> > wrote:
>>
>> > Is that available in ParaView by any chance?
>> > ___________________________________________________________
>> > Mike Jackson                    Principal Software Engineer
>> >
>> >
>> > On Jul 4, 2013, at 9:53 AM, David E DeMarle <dave.demarle at kitware.com>
>> > wrote:
>> >
>> > > pointset->delauney->contour
>> > >
>> > > David E DeMarle
>> > > Kitware, Inc.
>> > > R&D Engineer
>> > > 21 Corporate Drive
>> > > Clifton Park, NY 12065-8662
>> > > Phone: 518-881-4909
>> > >
>> > >
>> > > On Thu, Jul 4, 2013 at 8:06 AM, Michael Jackson <
>> > mike.jackson at bluequartz.net> wrote:
>> > > Can VTK create a contour plot of "irregular" points? What I mean is
>> that
>> > I have a bunch of X,Y + intensity points but the X,Y points are NOT on a
>> > regular grid they are just "Point Data". A collaborator of mine uses
>> IDL to
>> > produce some plots from this data and I would like to use VTK for my own
>> > projects.
>> > >
>> > > Thanks for any help.
>> > > ___________________________________________________________
>> > > Mike Jackson                    Principal Software Engineer
>> > > BlueQuartz Software                            Dayton, Ohio
>> > > mike.jackson at bluequartz.net              www.bluequartz.net
>> > >
>> > > _______________________________________________
>> > > 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/20130704/372d753c/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 7
>> Date: Thu, 4 Jul 2013 07:01:04 -0700 (PDT)
>> From: Ruff <albin.nilsson at gmail.com>
>> Subject: Re: [vtkusers] How do I render a volume from an
>>         UnstructuredGrid?
>> To: vtkusers at vtk.org
>> Message-ID: <1372946464751-5721772.post at n5.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> I just noticed that in creating the unstructuredgrid, i do not count up
>> the
>> atomIndex in the writing loop (missing a 'atomIndex = atomIndex + 1').
>> Fixing this does not solve my problem though.
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/How-do-I-render-a-volume-from-an-UnstructuredGrid-tp5721766p5721772.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> Message: 8
>> Date: Thu, 4 Jul 2013 07:14:05 -0700 (PDT)
>> From: louiskoo <419655660 at qq.com>
>> Subject: [vtkusers] How to use vtkButtonWidget.AddObserver()
>> To: vtkusers at vtk.org
>> Message-ID: <1372947245702-5721774.post at n5.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> anyone can give me some ideas?
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/How-to-use-vtkButtonWidget-AddObserver-tp5721774.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> Message: 9
>> Date: Thu, 4 Jul 2013 16:19:07 +0200
>> From: mirko heuegger <mheuegger at gmail.com>
>> Subject: Re: [vtkusers] vtkButtonSource?vtkRectangularButtonSource
>>         ?vtkEllipticalButtonSource
>> To: louiskoo <419655660 at qq.com>
>> Cc: vtkusers <vtkusers at vtk.org>
>> Message-ID:
>>         <CACR=3K4tBiyeSpnC1PfVtf=jCqaNmHEU9cyOWCkxJrw1Hh=
>> YqA at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hello!
>>
>> If I extend my mentioned example ('Form1.cs') by:
>> this.buttonWidget = vtkButtonWidget.New();
>> iren.LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(dummyEvnt);
>> this.buttonWidget.SetInteractor(this.RendWinInteractor);
>> this.buttonWidget.On();
>> and the event will fired, so I guess your snippet is working and the error
>> is located elsewhere.
>>
>>
>> regards
>>
>> mirko
>>
>>
>>
>> On Thu, Jul 4, 2013 at 3:28 PM, louiskoo <419655660 at qq.com> wrote:
>>
>> > Yes,I have taken your suggstion.
>> >
>> >   vtkButtonWidget buttonWidget = vtkButtonWidget.New();
>> >             vtkRenderWindowInteractor renderInteractor =
>> > renderWindowControl1.RenderWindow.GetInteractor();
>> >             renderInteractor.LeftButtonPressEvt += new
>> > vtkObject.vtkObjectEventHandler(renderInteractor_LeftButtonPressEvt);
>> >             buttonWidget.SetInteractor(renderInteractor);
>> >             buttonWidget.SetRepresentation(rep);
>> >             //buttonWidget.LeftButtonPressEvt += new
>> > vtkObject.vtkObjectEventHandler(buttonWidget_LeftButtonPressEvt);
>> >             buttonWidget.On();
>> >
>> > But the result is that the buttonWidget has no effect when I click the
>> > buttonWidget .
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://vtk.1045678.n5.nabble.com/vtkButtonSource-vtkRectangularButtonSource-vtkEllipticalButtonSource-tp5721752p5721767.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
>> >
>>
>>
>>
>> --
>> Real programmers don't document; if it was
>> hard to write, it should be hard to understand.
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.vtk.org/pipermail/vtkusers/attachments/20130704/96c5275b/attachment-0001.htm
>> >
>>
>> ------------------------------
>>
>> Message: 10
>> Date: Thu, 4 Jul 2013 16:41:04 +0200
>> From: Domenico Quaranta <n40.analysis at gmail.com>
>> Subject: [vtkusers] Vtk 6.0 dotnet
>> To: DeMarle David E <dave.demarle at kitware.com>
>> Cc: "vtkusers at vtk.org" <vtkusers at vtk.org>
>> Message-ID: <FFFB70FF-F916-4DE7-A0AD-5144A1A24B31 at gmail.com>
>> Content-Type: text/plain;       charset=us-ascii
>>
>> Hi Dave
>> I read that sometimes ago you posted that the new vtk 6.0 will support
>> .net automatically.
>> Is this still the case? Can I use vtk directly in vs2012?
>>
>> Thanks in advance
>>
>> Nico
>>
>> ------------------------------
>>
>> Message: 11
>> Date: Thu, 4 Jul 2013 08:02:27 -0700 (PDT)
>> From: Ruff <albin.nilsson at gmail.com>
>> Subject: [vtkusers] Is it possible to make an image slice of
>>         unstructured    grid?
>> To: vtkusers at vtk.org
>> Message-ID: <1372950147716-5721777.post at n5.nabble.com>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Im looking at examples and google, but i cannot find anywhere where they
>> start with an unstructured grid to use with VTK's image slicing abilities.
>> Can it be done, and in that case how would you do it? What conversions are
>> needed?
>>
>> If not, is there some way to use vtkStructuredPoints with the image
>> slicer?
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Is-it-possible-to-make-an-image-slice-of-unstructured-grid-tp5721777.html
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> vtkusers mailing list
>> vtkusers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>> End of vtkusers Digest, Vol 111, Issue 9
>> ****************************************
>>
>
>
>
> --
> *Best  Regards
> Rahul Indoria
> Mobile No: +49-157-35652212*
>



-- 
*Best  Regards
Rahul Indoria
Mobile No: +49-157-35652212*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130705/8bd0d9e4/attachment.htm>


More information about the vtkusers mailing list