<div>Jean-Piere,</div>
<div> </div>
<div>Thanks, that's probably the best solution for Ivan.</div>
<div> </div>
<div>Bill<br></div>
<div class="gmail_quote">On Nov 22, 2007 2:16 PM, Jean-Pierre Roux <<a href="mailto:jpr@creatis.insa-lyon.fr">jpr@creatis.insa-lyon.fr</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">Bill Lorensen wrote:<br>> Ivan,<br>> This seems to be a vtk question. In the future, please post questions<br></div>> like this to <a href="mailto:vtk-users@vtk.org">vtk-users@vtk.org</a> <mailto:
<a href="mailto:vtk-users@vtk.org">vtk-users@vtk.org</a>>.<br>
<div class="Ih2E3d">><br>> I notice you are using the vtkDICOMImageReader. itk has much better<br>> support for DICOM than vtk. In itk, your can use the<br>> itkGDCMSeriesFilenames class to get the list of files in multiple
<br>> dicom series. Also, the itk dicom reader based on GDCM is a robust,<br>> full featured reader.<br>> A dicom filename has nothing to do with the ordering of images in a<br>> series. The position information is stored within the file itself. It
<br>> may be that your files always are named with a numerical suffix that<br>> corresponds to the order of the images, but this is not in general<br>> true, nor guaranteed.<br>> If you are using vtk, you will have to retrieve the
<br>> ImagePositionPatient for each file and sort the file names accordingly.<br></div>That's right.<br>But, if you want to go on using vtk only (and not ITK), you can download<br>GDCM, that comes with a vtkGdcmReader, and use the gdcm::SerieHelper,
<br>that allows you task for file sorting, and them reading the whole file<br>set into a single vtkImageData.<br><br><a href="http://www.creatis.univ-lyon1.fr/Public/Gdcm" target="_blank">http://www.creatis.univ-lyon1.fr/Public/Gdcm
</a><br><br>Jean-Pierre Roux<br>
<div class="Ih2E3d">> Your real question I think will be best answered by the vtkusers list.<br>><br>> Bill<br>><br>> On Nov 22, 2007 1:20 PM, ivan gm <<a href="mailto:ivan.gm.itk@gmail.com">ivan.gm.itk@gmail.com
</a><br></div>
<div>
<div></div>
<div class="Wj3C7c">> <mailto:<a href="mailto:ivan.gm.itk@gmail.com">ivan.gm.itk@gmail.com</a>>> wrote:<br>><br>> Hello:<br>><br>> I'm trying to show images with C++ in an MFC GUI. I have 79 images
<br>> to read in DICOM format, nowadays I'm reading each image separate<br>> with a vtkDICOMImageReader with this code:<br>><br>> std::string path = cFileDialog.GetPathName();<br>> std::string file =
cFileDialog.GetFileName();<br>> path = path.erase(path.rfind(file),file.length());<br>> this->readerDirectory = path;<br>> this->nameGenerator->SetDirectory( path.c_str());<br>> this->nameGenerator->SetFileNameSortingOrderToSortByImageNumber();
<br>> this->fileNames = this->nameGenerator->GetFileNames();<br>> // read new data<br>> n_value = 0;<br>> if (!this->pvtkDICOMReader)<br>> this->pvtkDICOMReader = vtkDICOMImageReader::New();
<br>> this->pvtkDICOMReader->SetFileName(this->fileNames[n_value].c_str());<br>><br>> After that, I show the image in my form with this code:<br>><br>> this->pvtkDICOMReader->Update();
<br>><br>> this->pvtkImageMapper->SetInput(this->pvtkDICOMReader->GetOutput());<br>> this->pvtkImageMapper->SetColorWindow(8192);<br>> this->pvtkImageMapper->SetColorLevel(128);
<br>> this->pvtkActor2D->SetMapper(this->pvtkImageMapper);<br>> this->pvtkRenderer->AddActor(this->pvtkActor2D);<br>><br>> I read the first image showing it in the form and when i push a
<br>> button I read the second and then the third... It runs perfectly<br>> but what I want to do is to read all my 79 images with the<br>> vtkDICOMImageReader and after that show the image with an index
<br>> number from 0 to 78 as an example. I don't know how to do that and<br>> if it is possible. Do you have any suggestions?<br>><br>> Thanks a lot and<br>> sorry for my English.<br>>
<br>> _______________________________________________<br>> Insight-developers mailing list<br></div></div>> <a href="mailto:Insight-developers@itk.org">Insight-developers@itk.org</a> <mailto:<a href="mailto:Insight-developers@itk.org">
Insight-developers@itk.org</a>><br>
<div class="Ih2E3d">> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>><br>><br></div>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Insight-users mailing list<br>> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br>><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote>
</div><br>