[Insight-users] Reading DICOM-RT with vtkGDCMPolyDataReader as supposed by Charles Wang

Lodron, Gerald Gerald.Lodron at joanneum.at
Mon Oct 5 09:44:34 EDT 2009


First of all: Thanks for the fast reply.

I changed those settings and recompiled, but the changes did not effect the result. I debugged it and I never come to the continue statement listed in the change log of your link.

During the debugging I found following out:

The vtkGDCMPolyDataReader correctly reads more than one point from the file (line 367-369) but the update must fail. Maybe it is in the ptId variable on line 370? This variable is 0 every loop I run. Or is the error in the npts variable of the for loop on line 364 because this variable is 1 all time, the only real loop I go throug is those on line 272. Should i send you my dicom file?

Best regards,





________________________________
Von: insight-users-bounces at itk.org [mailto:insight-users-bounces at itk.org] Im Auftrag von Lodron, Gerald
Gesendet: Montag, 05. Oktober 2009 14:45
An: Insight users (insight-users at itk.org)
Betreff: [Insight-users] Reading DICOM-RT with vtkGDCMPolyDataReader as supposed by Charles Wang

Hello ITK users group,

I am trying to read (and display) DICOM RT Structure Sets. On http://www.insight-journal.org/browse/publication/316 I found a nice hint in the review section of Charles Wang. I tried to implement it with the following code:


vtkGDCMPolyDataReader * PolyReader = vtkGDCMPolyDataReader::New();

PolyReader->SetFileName( argv[1] );

PolyReader->Update();

//PolyReader->Print(std::cerr);

vtkPolyData * polyData = PolyReader->GetOutput();



But when I look at the object polyData I only see strange results:



int a = polyData->GetNumberOfCells();//1

int b = polyData->GetNumberOfLines();//0

int c = polyData->GetNumberOfPieces();//1

int d = polyData->GetNumberOfPoints();//1

int e = polyData->GetNumberOfPolys();//1

int f = polyData->GetNumberOfStrips();//0

int g = polyData->GetNumberOfVerts();//0



For sure, also the displaying of those object fails. So I think that the reader stops after the first point reading, does anybody (maybe Charles Wang) know how to read those RT Structure Sets without modifying the PolyReader object and without writing a new parser? Would be very great, special thanks to all helpers!

Best regards,

Gerald Lodron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091005/3598bb5e/attachment-0001.htm>


More information about the Insight-users mailing list