[vtkusers] RE: vtkusers Digest, Vol 15, Issue 15
MI RG
mirgvtk at hotmail.com
Mon Jul 11 22:39:25 EDT 2005
Hi all,
I have tried the following code, it runs, but nothing can be seen on screen.
Can someone please help me, what the wrong thing I am doing?
Here is the code that I have tested. Thanks for help.
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkInteractorStyleTrackballCamera.h"
#include "vtkDICOMImageReader.h"
#include "vtkImagePlaneWidget.h"
int main (int argc, char **argv)
{
/*if (argc < 2)
{
cout << "Usage: " << argv[0] << " c:\\dicom_images\\series1" << endl;
return 0;
}*/
vtkRenderer *aRenderer = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(aRenderer);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
vtkInteractorStyleTrackballCamera *trackballStyle =
vtkInteractorStyleTrackballCamera::New();
iren->SetInteractorStyle(trackballStyle);
iren->SetRenderWindow(renWin);
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
//reader->SetDirectoryName("c:\\dicom_images\\series1");
reader->SetDirectoryName(argv[1]);
vtkImagePlaneWidget *widget = vtkImagePlaneWidget::New();
//widget->SetInput(reader->GetOutput());
widget->SetInput(reinterpret_cast<vtkDataSet *>( reader->GetOutput()));
widget->DisplayTextOn();
widget->SetInteractor(iren);
iren->Initialize();
iren->Start();
return 0;
}
>From: vtkusers-request at vtk.org
>Reply-To: vtkusers at vtk.org
>To: vtkusers at vtk.org
>Subject: vtkusers Digest, Vol 15, Issue 15
>Date: Wed, 6 Jul 2005 11:01:40 -0400 (EDT)
>
>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: To medical imaging community (Tommy)
> 2. Re: (no subject) Grind Rendering (vidyadhar)
> 3. Re: Disabling vtkOutputWindow (Luca Picello)
> 4. Re: Disabling vtkOutputWindow (Sean McInerney)
> 5. bug #1452 (dean.inglis at camris.ca)
> 6. Re: Is Unicode text possible with vtk? (Jeremy Winston)
> 7. Re: Is Unicode text possible with vtk? (Sean McBride)
> 8. Re: Mean curvature (Jos? Nsasi B.)
> 9. Re: Patented (David Cole)
> 10. Re: Disabling vtkOutputWindow (Dean Inglis)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Wed, 6 Jul 2005 15:17:51 +0800
>From: "Tommy" <tommy1123 at gmail.com>
>Subject: [vtkusers] Re: To medical imaging community
>To: vtkusers at public.kitware.com
>Message-ID: <dag0j5$ecd$1 at sea.gmane.org>
>
>The best way for visualizing the volume data is by vtkImagePlaneWidget, in
>which you can go through any slices in any directions interactively.
>
>aRenderer = vtkRenderer::New();
>renWin = vtkRenderWindow::New();
>renWin->AddRenderer(aRenderer);
>iren = vtkRenderWindowInteractor::New();
>trackballStyle = vtkInteractorStyleTrackballCamera::New();
>iren->SetInteractorStyle(trackballStyle);
>iren->SetRenderWindow(renWin);
>
>reader = vtkDICOMImageReader::New();
>reader->SetDirectoryName("c:\\dicom_images\\series1");
>
>widget = vtkImagePlaneWidget::New();
>widget->SetInput(reader->GetOutput());
>widget->DisplayTextOn();
>widget->SetInteractor(iren);
>
>iren->Initialize();
>iren->Start();
>
>But if you want to have a segmented 3D model, you can use vtkContourFilter
>to extract iso-intensity surfaces.
>
>Tommy
>
>"MI RG" <mirgvtk at hotmail.com> wrote in message
>news:BAY12-F21F72AB354586F4B0638D5B7E70 at phx.gbl...
> > To medical imaging community
> >
> > Hi all,
> >
> > I new to VTK and working on DICOM medical images, can someone tell me
>how
> > could I read and visualize DICOM? If someone can send me some code.
> >
> > Thanks to reply.
> >
> > _________________________________________________________________
> > Get an advanced look at the new version of MSN Messenger.
> > http://messenger.msn.com.my/Beta/Default.aspx
> >
> > _______________________________________________
> > This is the private VTK discussion list. Please keep messages on-topic.
> > Check the 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: Wed, 6 Jul 2005 14:57:19 +0530
>From: "vidyadhar" <vidyadhar at lucidindia.net>
>Subject: Re: [vtkusers] (no subject) Grind Rendering
>To: "Sean Farrell" <sean.farrell at baw.de>
>Cc: vtkusers <vtkusers at vtk.org>
>Message-ID: <001b01c5820c$e8ca2ef0$2d01a8c0 at pf244>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Hi,
>Get vtkProperty from the actor and call its SetRepresentationToWireframe
>method. Default is Surface and Points is one more possibility.
>HTH
>Vidyadhar
>----- Original Message -----
>From: "Sean Farrell" <sean.farrell at baw.de>
>To: <vtkusers at vtk.org>
>Sent: Wednesday, July 06, 2005 11:52 AM
>Subject: Re: [vtkusers] (no subject) Grind Rendering
>
>
> > You must use a vtk*GridGeometryFilter if it ist a Grid to make a
> > PolyData of it. If it is Polydata you must use a vtkExtractEdges to
> > crate wour edges.
> >
> > I am fairly new to vtk too and don't know if it is any valid advice. Use
> > the manual with a search engine. 8o)
> >
> >
> > Sean
> >
> > Am Dienstag, den 05.07.2005, 07:10 -0700 schrieb ALI AWARKI:
> > > hi all,
> > >
> > > i am new to vtk, and i am trying to display the edges of a mesh. i
> > > constructed one using 6 cells of type HEXAHEDRON, and i set the
> > > property of the the actor as follows (relevant parts shown only):
> > >
> > > vtkProperty *actprop=vtkProperty::New();
> > > actprop->EdgeVisibilityOn();
> > > actprop->SetEdgeColor(0,0,0);
> > >
> > > vtkActor *gridact=vtkActor::New();
> > > gridact->SetProperty(actprop);
> > >
> > > After running I still don't get to see the edges of the created cells.
> > >
> > > any help??
> > >
> > > thx in advance.
> > >
> > >
> > >
> > >
> > >
> > > ______________________________________________________________________
> > > Yahoo! Mail
> > > Stay connected, organized, and protected. Take the tour
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
> >
> >
>
>
>
>------------------------------
>
>Message: 3
>Date: Wed, 06 Jul 2005 11:34:04 +0200
>From: Luca Picello <luca.picello at libero.it>
>Subject: Re: [vtkusers] Disabling vtkOutputWindow
>To: Yianis Nikolaou <yianisn at gmail.com>
>Cc: vtkusers at vtk.org, rywchiu <rywchiu at interchange.ubc.ca>
>Message-ID: <42CBA58C.4040508 at libero.it>
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>Yep, another question:
>is it possible to have a log file or at least an output through
>OutputDebugString() (win32) so I can catch error and warning messages
>without having another debug window? (if the program hangs the window is
>not responding so I can't even read messages)
>
>see you,
>Luca
>
>
>
>Yianis Nikolaou wrote:
>
> > hi,
> >
> > you may also call the follownig static function somewhere in the
> > beginning of your prorgram
> >
> > vtkObject::GlobalWarningDisplayOff();
> >
> > yianis
> >
> >
> >
> >
> > On 6/20/05, *rywchiu* <rywchiu at interchange.ubc.ca
> > <mailto:rywchiu at interchange.ubc.ca>> wrote:
> >
> > Hi,
> >
> > Is there any way to prevent the vtkOutputWindow from opening
> > whenever an error occurs? There are methods that allow you to
> > output dialog boxes instead, but I don't want those either... Any
> > suggestions?
> >
> > Thanks for any help!
> > Rita
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> > <http://www.vtk.org/mailman/listinfo/vtkusers>
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the 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://public.kitware.com/pipermail/vtkusers/attachments/20050706/b43657d1/attachment.html
>
>------------------------------
>
>Message: 4
>Date: Wed, 06 Jul 2005 06:31:05 -0400
>From: Sean McInerney <seanm at nmr.mgh.harvard.edu>
>Subject: Re: [vtkusers] Disabling vtkOutputWindow
>To: Luca Picello <luca.picello at libero.it>
>Cc: vtkusers at vtk.org, rywchiu <rywchiu at interchange.ubc.ca>
>Message-ID: <42CBB2E9.2090009 at nmr.mgh.harvard.edu>
>Content-Type: text/plain; charset=ISO-8859-1
>
>Custom debug/warning/error output behavior can be achieved via a
>vtkOutputWindow subclass. The virtual methods can be overridden to send
>messages anywhere you want (such as a log file, XML, or GUI window).
>Don't forget to call the SetInstance static method with the
>specialization in order to make it the new singleton instance used by
>VTK. Have a look at the Doxygen docs.
>
>-Sean
>
>P.S. When logging to a file, don't forget to flush!
>
>Luca Picello wrote:
> >
> > Yep, another question:
> > is it possible to have a log file or at least an output through
> > OutputDebugString() (win32) so I can catch error and warning messages
> > without having another debug window? (if the program hangs the window is
> > not responding so I can't even read messages)
> >
> > see you,
> > Luca
> >
> >
> >
> > Yianis Nikolaou wrote:
> >
> >> hi,
> >>
> >> you may also call the follownig static function somewhere in the
> >> beginning of your prorgram
> >>
> >> vtkObject::GlobalWarningDisplayOff();
> >>
> >> yianis
> >>
> >>
> >>
> >>
> >> On 6/20/05, *rywchiu* <rywchiu at interchange.ubc.ca
> >> <mailto:rywchiu at interchange.ubc.ca>> wrote:
> >>
> >> Hi,
> >>
> >> Is there any way to prevent the vtkOutputWindow from opening
> >> whenever an error occurs? There are methods that allow you to
> >> output dialog boxes instead, but I don't want those either... Any
> >> suggestions?
> >>
> >> Thanks for any help!
> >> Rita
> >>
> >> _______________________________________________
> >> This is the private VTK discussion list.
> >> Please keep messages on-topic. Check the FAQ at:
> >> http://www.vtk.org/Wiki/VTK_FAQ
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtkusers
> >> <http://www.vtk.org/mailman/listinfo/vtkusers>
> >>
> >>
> >>------------------------------------------------------------------------
> >>
> >>_______________________________________________
> >>This is the private VTK discussion list.
> >>Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
> >>Follow this link to subscribe/unsubscribe:
> >>http://www.vtk.org/mailman/listinfo/vtkusers
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>------------------------------
>
>Message: 5
>Date: Wed, 6 Jul 2005 7:42:49 -0400
>From: <dean.inglis at camris.ca>
>Subject: [vtkusers] bug #1452
>To: <vtkusers at public.kitware.com>
>Message-ID:
> <20050706114249.IQGT1877.tomts3-srv.bellnexxia.net@[209.226.175.82]>
>Content-Type: text/plain; charset=ISO-8859-1
>
>is there a chance someone with new pipeline
>knowhow can look at
>Bug #1452 - vtkImageAccumulate crashes/produces erroneous stats ?
>before the new release? I suspect it there may
>be a problem with vtkImageStencilData. I have a
>number of applications that use this class for ROI
>analysis that I would like to port to the current
>cvs version. If not, can there be an comprehensive
>update to the documentation describing the new
>pipeline architecture?
>
>thanks,
>Dean
>
>
>
>
>
>------------------------------
>
>Message: 6
>Date: Wed, 06 Jul 2005 09:48:40 -0400
>From: Jeremy Winston <jbw at ieee.org>
>Subject: Re: [vtkusers] Is Unicode text possible with vtk?
>To: krs <krs at uncc.edu>
>Cc: vtkusers at vtk.org
>Message-ID: <42CBE138.6060709 at ieee.org>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>krs wrote:
> > CVS doesnt download the the patented source files? - for some reason
> > this directory has no source files in my distribution.
> >
> > Again, its been a long time.
>
>Cf. http://public.kitware.com/pipermail/vtkusers/2005-May/079708.html
>
>HTH,
>-Jeremy
>
>
>------------------------------
>
>Message: 7
>Date: Wed, 6 Jul 2005 10:13:11 -0400
>From: "Sean McBride" <sean at rogue-research.com>
>Subject: Re: [vtkusers] Is Unicode text possible with vtk?
>To: krs <krs at uncc.edu>, <vtkusers at vtk.org>
>Message-ID: <20050706141311.31292 at smtp10.qc.aibn.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>Hi again krs,
>
>Are you saying that there are patented classes that support Unicode
>text? Which ones? Or were you just hijacking my thread? :-)
>
>On 2005-07-05 19:16, krs said:
>
> >CVS doesnt download the the patented source files? - for some reason
> >this directory has no source files in my distribution.
> >
> >Again, its been a long time.
> >
> > === krs
> >
> >On Jul 5, 2005, at 6:55 PM, Sean McBride wrote:
> >
> >> Hello,
> >>
> >> I have been looking at vtkVectorText and vtkTextSource and they both
> >> have a method SetText() that appears to only accept ASCII strings. Is
> >> this the case?
> >>
> >> Is there any vtk class that accepts unicode strings? UTF-8,
> >> UTF-16, big/
> >> little endian I don't care, but ASCII is too limiting. If there is no
> >> support, is it planned?
> >>
> >> Thanks!
>
>
>--
>____________________________________________________________
>Sean McBride, B. Eng sean at rogue-research.com
>Rogue Research www.rogue-research.com
>Mac Software Developer Montréal, Québec, Canada
>
>
>
>
>------------------------------
>
>Message: 8
>Date: Wed, 06 Jul 2005 10:24:54 -0400
>From: Jos? Nsasi B. <jnsasi at hotmail.com>
>Subject: [vtkusers] Re: Mean curvature
>To: vtkusers at vtk.org
>Message-ID: <BAY104-F1627C2AE65E8F49B4688CCC3D90 at phx.gbl>
>Content-Type: text/plain; charset="us-ascii"
>
>An HTML attachment was scrubbed...
>URL:
>http://public.kitware.com/pipermail/vtkusers/attachments/20050706/a05df4de/attachment.htm
>
>------------------------------
>
>Message: 9
>Date: Wed, 06 Jul 2005 10:33:46 -0400
>From: David Cole <david.cole at kitware.com>
>Subject: [vtkusers] Re: Patented
>To: Sean McBride <sean at rogue-research.com>
>Cc: vtkusers at vtk.org
>Message-ID: <42CBEBCA.4040403 at kitware.com>
>Content-Type: text/plain; charset="us-ascii"
>
>An HTML attachment was scrubbed...
>URL:
>http://public.kitware.com/pipermail/vtkusers/attachments/20050706/1a0997cf/attachment.html
>
>------------------------------
>
>Message: 10
>Date: Wed, 6 Jul 2005 11:05:33 -0400
>From: "Dean Inglis" <dean.inglis at camris.ca>
>Subject: Re: [vtkusers] Disabling vtkOutputWindow
>To: "vtkusers archive" <vtkusers at vtk.org>
>Message-ID: <FBEIKIAGJCCFIBIPBIGMAEINCEAA.dean.inglis at camris.ca>
>Content-Type: text/plain; charset="iso-8859-1"
>
>Luca:
>
>you could add this at the beginning of
>your app to log to a text file:
>
> vtkOutputWindow* ow = vtkOutputWindow::GetInstance();
> vtkFileOutputWindow* fow = vtkFileOutputWindow::New();
> fow->SetFileName( "debug.log" );
> if ( ow )
> {
> ow->SetInstance( fow );
> }
> fow->Delete();
>
>If you are using C++ Builder:
>
> String m_workingDir = GetCurrentDir();
> String m_debugFile = m_workingDir + "\\debug.log";
> fow->SetFileName( m_debugFile.c_str() );
>
>Dean
>
>
>
>------------------------------
>
>_______________________________________________
>vtkusers mailing list
>vtkusers at vtk.org
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>End of vtkusers Digest, Vol 15, Issue 15
>****************************************
_________________________________________________________________
Find just what you are after with the more precise, more powerful new MSN
Search. http://search.msn.com.my/ Try it now.
More information about the vtkusers
mailing list