[vtkusers] Re: DICOM DATA for volume rendering

jose manjon jmanjon at fis.upv.es
Wed Jul 18 03:55:41 EDT 2001


Hi all,

I have developed a software that reads DICOM images.

I use 200 images of 256x256 pixels for volume rendering, I have converted them into raw files and I
am able to view the volume (very slow).

I worder how can I introduce my data (list of  images image[0..199] of bytes data[256*256]) into a
mapper internally in my program with to save a file in raw format and after reading it.

I use VC++ 5.0

thanks

jose


vtkusers-admin at public.kitware.com wrote:

> Send vtkusers mailing list submissions to
>         vtkusers at public.kitware.com
>
> To subscribe or unsubscribe via the web, visit
>         http://public.kitware.com/mailman/listinfo/vtkusers
> or, via email, send a message with subject or body 'help' to
>         vtkusers-request at public.kitware.com
> You can reach the person managing the list at
>         vtkusers-admin at public.kitware.com
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of vtkusers digest..."
>
> Today's Topics:
>
>   1. vtk w/ CAVElib and clipping (Tony Lavoie)
>   2. Re: problem with scaling with wxVTKRenderWindow (Julian Humphries)
>   3. Re: vtk w/ CAVElib and clipping (John Shalf)
>   4. Re: vtk w/ CAVElib and clipping (Tony Lavoie)
>   5. VTK & QDialog, Linux vs NT (Ann Gentile)
>   6. RE: 3-D coordinates from vtkRenderWindow (=?iso-8859-1?Q?Jos=E9_A._Romero_M.?=)
>   7. multiple copies of models...why? (J. Scott Pendergrass)
>   8. VTK & QDialog, Linux vs NT (Ann Gentile)
>   9. Re: (no subject)->Linux RH6.1, Tcl,Mesa,Java,Python (fwd) (Subha Parvathy Mahaadevan)
>   10. vtk linking under WindowsNT / VisualC++ 6.0 (=?iso-8859-1?q?Herbert=20Muthsam?=)
>
> --__--__--
>
> Message: 1
> Date: Tue, 17 Jul 2001 11:16:28 -0500 (CDT)
> From: Tony Lavoie <lavoie at mcs.anl.gov>
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] vtk w/ CAVElib and clipping
>
> Hello all! I'm using vtk in a CAVE application. The CAVE library does its
> own OpenGL calls to manage the camera view and stereo rendering, so I have
> CAVE-based subclasses to RenderWindow and Renderer which avoid calling
> those things which are handled by the CAVE lib- swapbuffer calls,
> Camera::Render calls, etc. All of this works actually, though I've got an
> interesting side-effect.
>
> Whether I have the headsq dataset or a simple cone on display in the cave,
> if I translate it vertically (set with PolyDataMapper::SetTranslation)
> past a certain point, the object disappears, as if the display list gets
> clipped. Printing the properties of the PolyDataMapper shows that no
> clipping planes are defined, and no glEnables get called for clipping
> planes (at least in PolyDataMapper). Maybe of some use, these
> CAVE-based subclasses were initially written for vtk2.3; I brought them up
> to be able to build against vtk3.2.
>
> What else could be mangling things and causing this case of disappearing
> graphical objects?
>
> -Tony
>
> --__--__--
>
> Message: 2
> Date: Tue, 17 Jul 2001 11:35:07 -0700
> From: Julian Humphries <humphries at mail.utexas.edu>
> Reply-To: jmhbs at uno.edu
> To: Juerg Tschirren <juerg-tschirren at uiowa.edu>
> CC: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] problem with scaling with wxVTKRenderWindow
>
> ....ren.GetActiveCamera().SetClippingRange(1.0,1000)(or other values as
> appropriate.  The best values depend on the actual scalar size of your object.
> The default clipping planes seem to include a much smaller range.
>
> Julian Humphries
>
> Juerg Tschirren wrote:
> >
> > I wrote a VTK application in Python with wxPython. The problem I run into
> > is mit wxVTKRenderWindow. When I slide the mouse with the right
> > mouse-button pressed my scene scales similar like it does with
> > vtkRenderWindow. But the difference is that, if I scale to much in or out,
> > my objects "clip" off, means they disapear.
> >
> >   For example if I scale down (right mouse-botton pressed and moving the
> > mouse towards me), then in wxVTKRenderWindow all the objects disapear
> > after a short mouse-movement, whereas with vtkRenderWindow the objects are
> > getting smaller and smaller till they finally "melt together" in one
> > single point.
> >
> >   Does anybody know what is causing that? How can I avoid this clipping?
> >
> > Juerg
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
>
> --__--__--
>
> Message: 3
> Date: Tue, 17 Jul 2001 10:49:46 -0700
> From: John Shalf <jshalf at lbl.gov>
> Reply-To: jshalf at lbl.gov
> Organization: Lawrence Berkeley National Laboratory
> To: Tony Lavoie <lavoie at mcs.anl.gov>
> Cc: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] vtk w/ CAVElib and clipping
>
> Are you sure it isn't the CAVE-defined front/back clipping
> planes?
>
> Have you looked at the other CAVE/vtk rendering engines like
> Paul Rajlich's Performer-based version
>   http://brighton.ncsa.uiuc.edu/%7Eprajlich/vtkActorToPF/
> Or if you need pure OpenGL (don't have Performer on your
> machine), then there's Matt Hall's
> vtkCaveRenderWindow/VTK2CAVE
>   http://zeus.ncsa.uiuc.edu/~mahall/
>
> -john
>
> Tony Lavoie wrote:
> >
> > Hello all! I'm using vtk in a CAVE application. The CAVE library does its
> > own OpenGL calls to manage the camera view and stereo rendering, so I have
> > CAVE-based subclasses to RenderWindow and Renderer which avoid calling
> > those things which are handled by the CAVE lib- swapbuffer calls,
> > Camera::Render calls, etc. All of this works actually, though I've got an
> > interesting side-effect.
> >
> > Whether I have the headsq dataset or a simple cone on display in the cave,
> > if I translate it vertically (set with PolyDataMapper::SetTranslation)
> > past a certain point, the object disappears, as if the display list gets
> > clipped. Printing the properties of the PolyDataMapper shows that no
> > clipping planes are defined, and no glEnables get called for clipping
> > planes (at least in PolyDataMapper). Maybe of some use, these
> > CAVE-based subclasses were initially written for vtk2.3; I brought them up
> > to be able to build against vtk3.2.
> >
> > What else could be mangling things and causing this case of disappearing
> > graphical objects?
> >
> > -Tony
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
>
> --__--__--
>
> Message: 4
> Date: Tue, 17 Jul 2001 13:00:18 -0500 (CDT)
> From: Tony Lavoie <lavoie at mcs.anl.gov>
> To: John Shalf <jshalf at lbl.gov>
> cc: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] vtk w/ CAVElib and clipping
>
> Pretty sure, since everything draws fine initially, and I can navigate
> around the object, look up and down on it, but if I adjust its translation
> on the polydatamapper up (I'm trying to get it into the center of the
> physical CAVE space), it'll disappear. This is while it's running- I'll
> click it up and up, and at a certain point, >poof< it's all gone. If I
> click it down, it'll reappear though.
>
> Thanks for the other links though, I'll check them out. But I'm just
> trying to understand what's going on here, because I want to have this
> code working. :)
>
> -Tony
>
> On Tue, 17 Jul 2001, John Shalf wrote:
>
> >
> > Are you sure it isn't the CAVE-defined front/back clipping
> > planes?
> >
> > Have you looked at the other CAVE/vtk rendering engines like
> > Paul Rajlich's Performer-based version
> >   http://brighton.ncsa.uiuc.edu/%7Eprajlich/vtkActorToPF/
> > Or if you need pure OpenGL (don't have Performer on your
> > machine), then there's Matt Hall's
> > vtkCaveRenderWindow/VTK2CAVE
> >   http://zeus.ncsa.uiuc.edu/~mahall/
> >
> > -john
> >
> > Tony Lavoie wrote:
> > >
> > > Hello all! I'm using vtk in a CAVE application. The CAVE library does its
> > > own OpenGL calls to manage the camera view and stereo rendering, so I have
> > > CAVE-based subclasses to RenderWindow and Renderer which avoid calling
> > > those things which are handled by the CAVE lib- swapbuffer calls,
> > > Camera::Render calls, etc. All of this works actually, though I've got an
> > > interesting side-effect.
> > >
> > > Whether I have the headsq dataset or a simple cone on display in the cave,
> > > if I translate it vertically (set with PolyDataMapper::SetTranslation)
> > > past a certain point, the object disappears, as if the display list gets
> > > clipped. Printing the properties of the PolyDataMapper shows that no
> > > clipping planes are defined, and no glEnables get called for clipping
> > > planes (at least in PolyDataMapper). Maybe of some use, these
> > > CAVE-based subclasses were initially written for vtk2.3; I brought them up
> > > to be able to build against vtk3.2.
> > >
> > > What else could be mangling things and causing this case of disappearing
> > > graphical objects?
> > >
> > > -Tony
> > >
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > > Follow this link to subscribe/unsubscribe:
> > > http://public.kitware.com/mailman/listinfo/vtkusers
> >
> >
>
> --__--__--
>
> Message: 5
> From: Ann Gentile <gentile at dancer.ca.sandia.gov>
> To: vtkusers at public.kitware.com
> Date: Tue, 17 Jul 2001 13:47:01 -0700 (PDT)
> Cc: gentile at dancer.ca.sandia.gov (Ann Gentile)
> Subject: [vtkusers] VTK & QDialog, Linux vs NT
>
> hi all
>
> VTK 3.2 & Qt 2.3 Single-threaded DLL.
>
> In vtkInteractorStyleUser I've
> Set(Right/Left)ButtonPressMethods to bring up modal
> QDialog boxes. The behavior I'd like is that pressing
> the right button will cause other VTK and QT events to
> be ignored until the user has exited the right button's
> QDialog. However, the behavior i get if I press the
> right button and then the left button:
> under linux:
> 1) right button dialog only comes up
> 2) i can interact right button dialog until i exit it
> 3) then left button dialog comes up
>
> under NT:
> 1) right button dialog comes up
> 2) left button dialog comes up
> 3) i can interact only with left button dialog
> 4) after exiting left button dialog, then i can interact
>    with right button dialog
>
> Have i got to combine QT and VTK event loops to do this properly?
> Is there any easy way to at least get the linux behavior on NT (so that
> one at least blocks the other ? I fiddled with trying
> RenderWindowInteractor.Disable() just before bringing up the right
> dialog so as to ignore events from the other buttons, but on linux at least
> then i cannot interact with the right dialog). Is NT version inherently
> multi-threaded and is that why both dialog boxes come up in the NT version
> rather than one blocking the other (VTK NT installation things i've seen
> say to choose to link multi-threaded DLL) ?
>
> thanks for any info
> ag
>
> --__--__--
>
> Message: 6
> From: "=?iso-8859-1?Q?Jos=E9_A._Romero_M.?=" <jaroma at gemtel.com.mx>
> To: <vtkusers at public.kitware.com>
> Subject: RE: [vtkusers] 3-D coordinates from vtkRenderWindow
> Date: Tue, 17 Jul 2001 17:19:22 -0500
> charset="iso-8859-1"
>
> You can put a button, and when it is activated, and when you make a clic
> mouse, send the letter 'p', well, that's my idea.
>
> --
> Pépe
>
> Puebla
> --
>
>  -----Mensaje original-----
> De:     vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]  En nombre de Gerald Dalley
> Enviado el:     Miércoles, 11 de Julio de 2001 08:02 a.m.
> Para:   Jeff Stoll; vtkusers at public.kitware.com
> Asunto: RE: [vtkusers] 3-D coordinates from vtkRenderWindow
>
> Here's an excerpt of an example of retreiving the 3D coordinates of a pick
> in an MFC dialog box.  If you're using the normal UNIX displays and/or an
> MFC document-view structure, it's actually easier than what I've done (e.g.
> you don't have to cheat and use PreTranslateMessage).  In my implementation,
> pressing the "P" key causes a picking action that requires finding the
> object selected.  I wrote this code originally for VTK 2.4, before
> interactor styles were around, so there are probably slightly cleaner ways
> to do some of what I've shown here.
>
> Hope this helps.
>
> --Gerald Dalley
>   dalleyg at ee.eng.ohio-state.edu
>
> ----------------8<-------cut here------------------8<--------------------
> /* This method allows us to trap keystrokes while in an MFC dialog box.
>    In this case, we trap the "p" key and pass it off to the normal VTK
>    handler.  If we were using MFC document-view, we'd do this a different
>    way (using PreTranslateMessage is cheating and may not work exactly
>    correctly when Windows has a non-English keyboard driver or input
>    method installed). */
> BOOL CRegistrationPickerDlg::PreTranslateMessage(MSG* pMsg)
> {
>     bool propagateMessage = true;
>
>     switch (pMsg->message)
>     {
>         case WM_CHAR:
>             switch (pMsg->wParam)
>             {
>                 case 'p':
>                 case 'P':
>                     SetWindowLong(this->m_hWnd, GWL_USERDATA,
> (long)renWin0);
>                     vtkHandleMessage(this->m_hWnd, WM_CHAR, 'p', 0);
>                     propagateMessage = false;
>                     break;
>             }
>             break;
>     }
>
>     if (propagateMessage) {
>             return CDialog::PreTranslateMessage(pMsg);
>     } else {
>         return true;
>     }
> }
>
> /* When creating the window interactor, create the picker object
>    that will do our work for us.  Using MFC Dialog as setup, here's
>    the chain of events:
>         1) User moves mouse over desired object and presses "p"
>         2) CRegistrationPickerDlg::PreTranslateMessage gets called
>         3) vtkHandleMessage is called
>         4) iren0Picked is called
>         5) CRegistrationPickerDlg::HandlePick is called (see below)
> */
> BOOL CRegistrationPickerDlg::OnInitDialog()
> {
>     CDialog::OnInitDialog();
>
>     ...
>     pick0 = vtkCellPicker::New();
>         pick0->SetTolerance(0.00001);
>     iren0 = vtkRenderWindowInteractor::New();
>         iren0->SetPicker(pick0);
>         iren0->SetEndPickMethod(iren0Picked, this);
>     ...
>
>     return TRUE;  // return TRUE unless you set the focus to a control
>                       // EXCEPTION: OCX Property Pages should return FALSE
> }
>
> /* This is the function that will be called when "p" has been pressed.
>    We use it here simply as a wrapper for calling the
>    CRegistrationPickerDlg::HandlePick method. */
> void iren0Picked(void *dlg) {
>     CRegistrationPickerDlg *me = (CRegistrationPickerDlg*)dlg;
>
>     me->HandlePick();
> }
>
> /* This actually handles the picking operation.  I've left in a little
>    extra code because VTK gives you the closest picked point to the
>    camera that falls within the tolerance.  I needed a different criterion
>    for deciding which point to actually pick.  */
> void CRegistrationPickerDlg::HandlePick()
> {
>     int ptId;
>
>     vtkCellPicker *picker;
>     vtkPointSet *input;
>     vtkRenderer *renderer;
>     vtkRenderWindow *renWin;
>
>     picker = ((vtkCellPicker*)this->iren0->GetPicker());
>     input = this->input0;
>     renderer = this->renderer0;
>     renWin = this->renWin0;
>
>     float *center = picker->GetPickPosition();
>
>     int cellId = picker->GetCellId();
>
>     // We can't just use the SubId to pick the point, because VTK
>     // tends to give us the point closest to the *camera*, not the
>     // point closest to the point of intersection with the cell.
>     if (cellId >= 0) {
>         ptId = -1;
>         float distSquared;
>         float closestDistSquared = VTK_FLOAT_MAX;
>         My3Point *closestPoint = NULL;
>
>         vtkCell *pickedCell = input->GetCell(cellId);
>         My3Point *point;
>         int *idInCell = pickedCell->GetPointIds()->GetPointer(0);
>         int numIds = pickedCell->GetNumberOfPoints();
>         for (int subId=0; subId<numIds; subId++)
>         {
>             point = allPoints + (*idInCell);
>
>             distSquared =
>                 vtkMath::Distance2BetweenPoints(center, (float*)point);
>
>             if (distSquared < closestDistSquared)
>             {
>                 closestDistSquared = distSquared;
>                 ptId = *idInCell;
>                 closestPoint = point;
>             }
>
>             idInCell++;
>         }
>
>         if (this->InputBeingPicked == 0) {
>             // "Picked" the background
>             ...
>         } else {
>             // Picked a valid object
>             ...
>         }
>     }
>
>     renWin->Render();
> }
> ----------------8<-------cut here------------------8<--------------------
>
> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Jeff Stoll
> Sent: Tuesday, 10 July 2001 4:12 PM
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] 3-D coordinates from vtkRenderWindow
>
> To all vtk users:
>
>    So I have been doing a web search and have  come across some ideas
> but I can't seem to get anything to work.  Here is the problem, which
> seems to be a fairly popular problem.  I am trying to use the mouse to
> both manipulate the render window (zoom, pan, rotate) and also use it to
> click on actors in the render window and get their x,y, and z
> coordinates.  Unfortuneately I don't know how to get the mouse to become
> a 2 fold interactor, and I don't know how to get the x,y and z
> coordinates.  I know this must be an easy question to many of you out
> there, please help an inexperiance VTK user if you can.  Please email
> responses to busds at bu.edu
>
> Shaun Selha
> Dept. Aerospace and Mechanical Engineering
> Boston University
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
> --__--__--
>
> Message: 7
> Date: Tue, 17 Jul 2001 16:35:03 -0500
> To: vtkusers at public.kitware.com
> From: "J. Scott Pendergrass" <jsp at xontech.com>
> boundary="=====================_27166182==_"
> Subject: [vtkusers] multiple copies of models...why?
>
> --=====================_27166182==_
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
> VTK Gurus:
>
> I'm trying to write an application to view CAD models. The application
> works fine for the first model that I load in, but when I try to load other
> models, the older ones do not go away.
>
> I've attached a code snippet of the function that reads the data from a
> file and builds the VTK stuff. Each component of the CAD model has its own
> vtkPolyDataCollection and vtkActorCollection.
>
> Any suggestions?
>
> Thanks,
> Scott
> --=====================_27166182==_
> Content-Type: text/plain; charset="us-ascii"
> Content-Disposition: attachment; filename="foobar.cxx"
>
> vtkActor *actorFacet;
> vtkActor *actorAxes;
> vtkActor *actorOutline;
> vtkFollower *actorXLabel, *actorYLabel, *actorZLabel;
> vtkActorCollection *actorCollectFacet;
>
> //
> // read the data from the input file and build actors
> //
> void ReadData(Widget textWindow)
> {
>   int i, j, n, numNodes, partCount;
>   int numBigParts, numSmallParts, numFacets, numSidesFacet, iCoat;
>   int nodes[3];
>   char line[MAX_CHARS_PER_LINE];
>   float x, y, z;
>
>   static int initialized = 0;
>
>   // points and connectivity for facets
>   vtkActor *actorFoo, *actorTemp;
>   vtkCellArray *caFacet;
>   vtkPoints *fpFacet;
>   vtkPolyData *pdFacet;
>   vtkPolyDataMapper *polyMapAxes = vtkPolyDataMapper::New();
>   vtkPolyDataMapper *polyMapFacet;
>   vtkPolyDataMapper *polyMapOutline = vtkPolyDataMapper::New();
>   vtkPolyDataCollection *pdc = vtkPolyDataCollection::New();
>   vtkOutlineFilter *outline = vtkOutlineFilter::New();  // bounding box
>   vtkAxes *axes = vtkAxes::New();  // (x,y,z) axes;
>
>   if (!initialized)
>   {
>     initialized = TRUE;
>   }
>   else
>   {
>     // clean up earlier stuff
>     actorCollectFacet->InitTraversal();
>     //actorFoo = vtkActor::New();
>     while ((actorFoo = actorCollectFacet->GetNextActor()) != NULL)
>     {
>       ren1->RemoveActor(actorFoo);
>       cout << "removing actor" << endl;
>     }
>
>     pdc->RemoveAllItems(); // doesn't seem to do anything
>
>     vtkActorCollection *acFoo;
>     acFoo = ren1->GetActors();
>     acFoo->InitTraversal();
>     while ((actorFoo = acFoo->GetNextActor()) != NULL)
>     {
>       ren1->RemoveActor(actorFoo);
>       cout << "removing ren1 actor" << endl;
>     }
>   }
>
>   //-------------------------
>   // begin reading facet file
>   //-------------------------
>
>   numFacetsTotal = 0;
>
>   facetFile.getline(line,MAX_CHARS_PER_LINE);  // read header
>   cout << line << endl;
>   UtlDispMsg(line,textWindow);
>   UtlDispMsg("\n",textWindow);
>
>   // read number of big parts
>   facetFile.getline(line,MAX_CHARS_PER_LINE);
>   sscanf(line,"%d",&numBigParts);
>   cout << "number of big parts: " << numBigParts << endl;
>   UtlDispMsg(line,textWindow);
>   UtlDispMsg("\n",textWindow);
>
>   partCount = 0;
>
>   // loop over number of big parts
>   for (n = 0; n < numBigParts; n++)
>   {
>     fpFacet = vtkPoints::New();
>
>     facetFile.getline(line,MAX_CHARS_PER_LINE);  // read the name of this big part
>     cout << "name of big part: " << line << endl;;
>     UtlDispMsg(line,textWindow);
>     UtlDispMsg("\n",textWindow);
>
>     facetFile.getline(line,MAX_CHARS_PER_LINE);
>
>     // read the number of nodes in this big part
>     facetFile.getline(line,MAX_CHARS_PER_LINE);
>     sscanf(line,"%d",&numNodes);
>     cout << "number of nodes: " << numNodes << endl;
>
>     // read the (x,y,z) coordinates of each nodes
>     for (i = 0; i < numNodes; i++)
>     {
>       facetFile.getline(line,MAX_CHARS_PER_LINE);
>       sscanf(line,"%f %f %f", &x, &y, &z);
>       fpFacet->InsertNextPoint(x,y,z);
>     }
>
>     pdFacet = vtkPolyData::New();
>     pdFacet->SetPoints(fpFacet);
>
>     // read the number of small parts in this big part
>     facetFile.getline(line,MAX_CHARS_PER_LINE);
>     sscanf(line,"%d",&numSmallParts);
>     cout << "number of small parts: " << numSmallParts << endl;
>
>     // loop over the number small parts
>     for (i = 0; i < numSmallParts; i++)
>     {
>       caFacet = vtkCellArray::New();
>
>       facetFile.getline(line,MAX_CHARS_PER_LINE);  // read the name of this small part
>       cout << "small part name: " << line << endl;
>       UtlDispMsg(line,textWindow);
>       UtlDispMsg("\n",textWindow);
>
>       // read the number of facets and the number of sides per facet
>       facetFile.getline(line,MAX_CHARS_PER_LINE);
>       sscanf(line,"%d %d", &numFacets, &numSidesFacet);
>
>       // loop over the number of facets
>       for (j = 0; j < numFacets; j++)
>       {
>         facetFile.getline(line,MAX_CHARS_PER_LINE);
>         // read the node numbers for each facet
>         sscanf(line,"%d %d %d %d", &nodes[0], &nodes[1], &nodes[2], &iCoat);
>         for (int k = 0; k < 3; k++) nodes[k]--;
>         caFacet->InsertNextCell(3,nodes);
>         numFacetsTotal++;
>       }
>
>       pdFacet->SetPolys(caFacet);
>       caFacet->Delete();
>
>       pdc->AddItem(pdFacet);
>       pdFacet->Delete();
>
>       partCount++;
>     }
>   }
>
>   //------------------------
>   // end reading facet file
>   //------------------------
>
>   pdc->InitTraversal();
>
>   for (i = 0; i < partCount; i++)
>   {
>     polyMapFacet = vtkPolyDataMapper::New();
>     polyMapFacet->SetInput(pdc->GetNextItem());
>     //polyMapFacet->ImmediateModeRenderingOff();
>     actorTemp = vtkActor::New();
>     actorTemp->SetMapper(polyMapFacet);
>     actorCollectFacet->AddItem(actorTemp);
>   }
>
>   actorCollectFacet->InitTraversal();
>   while ((actorFoo = actorCollectFacet->GetNextActor()) != NULL)
>   {
>     ren1->AddActor(actorFoo);
>   }
>
>   pdc->InitTraversal();
>
>   float maxDim;
>
>   for (int np = 0; np < partCount; np++)
>   {
>     bounds = pdc->GetNextItem()->GetBounds();
>     maxDim = 0.0;
>     for (i = 0; i < 6; i++)
>     {
>       if (bounds[i] > maxDim)
>       {
>         maxDim = bounds[i];
>       }
>     }
>   }
>
>   float scaleFactor = 2.0*maxDim;
>
>   // create axes
>   axes->SetOrigin(0,0,0);
>   axes->SetScaleFactor(scaleFactor);
>   polyMapAxes->SetInput(axes->GetOutput());
>   actorAxes->SetMapper(polyMapAxes);
>   actorAxes->PickableOff();
>
>   // labels for axes
>
>   float lSize = 0.1*maxDim;
>
>   // x axis
>   vtkVectorText *xText = vtkVectorText::New();
>   xText->SetText("X");
>   vtkPolyDataMapper *xTextMapper = vtkPolyDataMapper::New();
>   xTextMapper->SetInput(xText->GetOutput());
>   actorXLabel->SetMapper(xTextMapper);
>   actorXLabel->SetScale(lSize,lSize,lSize);
>   actorXLabel->SetPosition(scaleFactor,0.0,0.0);
>   actorXLabel->GetProperty()->SetColor(0,0,0);
>
>   // y axis
>   vtkVectorText *yText = vtkVectorText::New();
>   yText->SetText("Y");
>   vtkPolyDataMapper *yTextMapper = vtkPolyDataMapper::New();
>   yTextMapper->SetInput(yText->GetOutput());
>   actorYLabel->SetMapper(yTextMapper);
>   actorYLabel->SetScale(lSize,lSize,lSize);
>   actorYLabel->SetPosition(0.0,scaleFactor,0.0);
>   actorYLabel->GetProperty()->SetColor(0,0,0);
>
>   // z axis
>   vtkVectorText *zText = vtkVectorText::New();
>   zText->SetText("Z");
>   vtkPolyDataMapper *zTextMapper = vtkPolyDataMapper::New();
>   zTextMapper->SetInput(zText->GetOutput());
>   actorZLabel->SetMapper(zTextMapper);
>   actorZLabel->SetScale(lSize,lSize,lSize);
>   actorZLabel->SetPosition(0.0,0.0,scaleFactor);
>   actorZLabel->GetProperty()->SetColor(0,0,0);
>
>   ResetCamera();
> }
>
> --=====================_27166182==_
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
> ----------
> J. Scott Pendergrass
> XonTech, Inc.
> 5030 Bradford Drive NW
> Building 1, Suite 220
> Huntsville, AL 35805
>
> e-mail: jsp at xontech.com
> voice : (256) 837-9123
> FAX   : (256) 837-9125
>
> ----------
>
> --=====================_27166182==_--
>
> --__--__--
>
> Message: 8
> From: Ann Gentile <gentile at dancer.ca.sandia.gov>
> To: vtkusers at public.kitware.com
> Date: Tue, 17 Jul 2001 17:33:30 -0700 (PDT)
> Cc: gentile at dancer.ca.sandia.gov (Ann Gentile)
> Subject: [vtkusers] VTK & QDialog, Linux vs NT
>
> (my apologies if multiple copies sent)
>
> hi all
>
> VTK 3.2 & Qt 2.3 Single-threaded DLL.
>
> In vtkInteractorStyleUser I've
> Set(Right/Left)ButtonPressMethods to bring up modal
> QDialog boxes. The behavior I'd like is that pressing
> the right button will cause other VTK and QT events to
> be ignored until the user has exited the right button's
> QDialog. However, the behavior i get if I press the
> right button and then the left button:
> under linux:
> 1) right button dialog only comes up
> 2) i can interact right button dialog until i exit it
> 3) then left button dialog comes up
>
> under NT:
> 1) right button dialog comes up
> 2) left button dialog comes up
> 3) i can interact only with left button dialog
> 4) after exiting left button dialog, then i can interact
>    with right button dialog
>
> Have i got to combine QT and VTK event loops to do this properly?
> Is there any easy way to at least get the linux behavior on NT (so that
> one at least blocks the other ? I fiddled with trying
> RenderWindowInteractor.Disable() just before bringing up the right
> dialog so as to ignore events from the other buttons, but on linux at least
> then i cannot interact with the right dialog). Is NT version inherently
> multi-threaded and is that why both dialog boxes come up in the NT version
> rather than one blocking the other (VTK NT installation things i've seen
> say to choose to link multi-threaded DLL) ?
>
> thanks for any info
> ag
>
> --__--__--
>
> Message: 9
> Date: Tue, 17 Jul 2001 20:08:54 -0500 (CDT)
> From: Subha Parvathy Mahaadevan <smahaade at utsi.edu>
> To: vtkusers at public.kitware.com
> Subject: Re: [vtkusers] (no subject)->Linux RH6.1, Tcl,Mesa,Java,Python (fwd)
>
> I installed vtk rpms available for Linux7.1 from the ftp site
> ftp://public.kitware.com/pub/vtk/vtk3.2/RedHat7.0RPMs/
>
> I have also installed Mesa and tcl rpms available from the same site .
>
> My vtk executable (created by installing tcl ) is in the /usr/bin
> directory and my vtk example files are in the /usr/lib/vtk directory .
>
> when I run the following command
>         /usr/bin/vtk  /usr/lib/vtk/graphics/examplesTcl/Cone.tcl
>
>  I get the following error :
>  /usr/bin/vtk: error while loading shared libraries:
> /home/smahaade/library/libVTKCommonTcl.so: undefined symbol:
> __pure_virtual
>
> the directory mentioned in the error message is the softlink to the
> directory that has the libVTK*.so library files .
>
> Where have I gone worng ?
> Any help will be really appreciated .
>
> Thanks .
>
> Subha .
>
> --__--__--
>
> Message: 10
> Date: Wed, 18 Jul 2001 08:34:46 +0200 (CEST)
> From: =?iso-8859-1?q?Herbert=20Muthsam?= <herbert_muthsam at yahoo.de>
> To: vtk_ users <vtkusers at public.kitware.com>
> Subject: [vtkusers] vtk linking under WindowsNT / VisualC++ 6.0
>
> Hi, I urgently would need to use vtk but get the
> following linking problems under Windows NT / VC++
> 6.0.
> Any help would be greatly appreciated!
>
> Herbert J. MUTHSAM
> Institute of Mathematics
> University of Vienna
> AUSTRIA
>
> Erstellungsprotokoll
>
> --------------------Konfiguration: sphere - Win32
> Debug--------------------
>
> Befehlszeilen
> Erstellen der temporären Datei  "C:\TEMP\RSP2B.tmp"
> mit Inhalten
> [
> /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D
> "_DEBUG" /D "_CONSOLE" /D "_MBCS"
> /Fp"Debug/sphere.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD
> /GZ /c
> "E:\ps\todo\vtkhjm\sphere\sphere.cpp"
> ]
> Creating command line "cl.exe @C:\TEMP\RSP2B.tmp"
> Erstellen der temporären Datei  "C:\TEMP\RSP2C.tmp"
> mit Inhalten
> [
> kernel32.lib user32.lib gdi32.lib winspool.lib
> comdlg32.lib advapi32.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo
> /subsystem:console /incremental:yes
> /pdb:"Debug/sphere.pdb" /map:"Debug/sphere.map" /debug
> /machine:I386 /out:"Debug/sphere.exe" /pdbtype:sept
> .\Debug\sphere.obj
> ]
> Erstellen der Befehlzeile "link.exe
> @C:\TEMP\RSP2C.tmp"
> Ausgabefenster
> Kompilierung läuft...
> sphere.cpp
> e:\ps\todo\vtkhjm\sphere\sphere.cpp(42) : warning
> C4508: 'main' : Funktion sollte einen Wert
> zurueckgeben; Ergebnistyp 'void' angenommen
> Linker-Vorgang läuft...
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkViewport::SetBackground(float,float,float)"
> (__imp_?SetBackground at vtkViewport@@QAEXMMM at Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkRenderer::AddActor(class vtkActor *)"
> (__imp_?AddActor at vtkRenderer@@QAEXPAVvtkActor@@@Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkProperty::SetColor(float,float,float)"
> (__imp_?SetColor at vtkProperty@@QAEXMMM at Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: class
> vtkProperty * __thiscall vtkActor::GetProperty(void)"
> (__imp_?GetProperty at vtkActor@@QAEPAVvtkProperty@@XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkActor::SetMapper(class vtkMapper *)"
> (__imp_?SetMapper at vtkActor@@QAEXPAVvtkMapper@@@Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkActor * __cdecl vtkActor::New(void)"
> (__imp_?New at vtkActor@@SAPAV1 at XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkPolyDataMapper::SetInput(class vtkPolyData *)"
> (__imp_?SetInput at vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: class
> vtkPolyData * __thiscall
> vtkPolyDataSource::GetOutput(void)"
> (__imp_?GetOutput at vtkPolyDataSource@@QAEPAVvtkPolyData@@XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkPolyDataMapper * __cdecl
> vtkPolyDataMapper::New(void)"
> (__imp_?New at vtkPolyDataMapper@@SAPAV1 at XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkSphereSource::SetPhiResolution(int)"
> (__imp_?SetPhiResolution at vtkSphereSource@@QAEXH at Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkSphereSource::SetThetaResolution(int)"
> (__imp_?SetThetaResolution at vtkSphereSource@@QAEXH at Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkSphereSource::SetRadius(float)"
> (__imp_?SetRadius at vtkSphereSource@@QAEXM at Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkSphereSource * __cdecl vtkSphereSource::New(void)"
> (__imp_?New at vtkSphereSource@@SAPAV1 at XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkRenderWindowInteractor::SetRenderWindow(class
> vtkRenderWindow *)"
> (__imp_?SetRenderWindow at vtkRenderWindowInteractor@@QAEXPAVvtkRenderWindow@@@Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkRenderWindowInteractor * __cdecl
> vtkRenderWindowInteractor::New(void)"
> (__imp_?New at vtkRenderWindowInteractor@@SAPAV1 at XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: void __thiscall
> vtkRenderWindow::AddRenderer(class vtkRenderer *)"
> (__imp_?AddRenderer at vtkRenderWindow@@QAEXPAVvtkRenderer@@@Z)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkRenderer * __cdecl vtkRenderer::New(void)"
> (__imp_?New at vtkRenderer@@SAPAV1 at XZ)
> sphere.obj : error LNK2001: Nichtaufgeloestes externes
> Symbol "__declspec(dllimport) public: static class
> vtkRenderWindow * __cdecl vtkRenderWindow::New(void)"
> (__imp_?New at vtkRenderWindow@@SAPAV1 at XZ)
> Debug/sphere.exe : fatal error LNK1120: 18
> unaufgeloeste externe Verweise
> Fehler beim Ausführen von link.exe.
>
> Ergebnisse
> sphere.exe - 19 Fehler, 1 Warnung(en)
>
> =====
> Univ.-Prof. Dr. Herbert J. MUTHSAM
> Trautbach 12, A-3491 Elsarn im Straßertale
>
> ***********************************************************
> * e: herbert_muthsam at yahoo.de   ** Tel (++43)2735-79 221  *
> * http://gauss.mat.univie.ac.at ** Fax (++43)2735-79 301  *
> ***********************************************************
>
> __________________________________________________________________
> Do You Yahoo!?
> Gesendet von Yahoo! Mail - http://mail.yahoo.de
>
> --__--__--
>
> _______________________________________________
> vtkusers mailing list
> vtkusers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtkusers
>
> End of vtkusers Digest

--
----------------------------------------------------------
Jose Vicente Manjón Herrera
GIM (Group of Medical Informatics)
Applied Physics Department
Technical University of Valencia
46022 Valencia (SPAIN)
----------------------------------------------------------






More information about the vtkusers mailing list