[vtkusers] The use of vtkDicomImageReader.

Mathieu Malaterre Mathieu.Malaterre at creatis.insa-lyon.fr
Tue Nov 18 04:45:54 EST 2003


yasser salman wrote:
> hi mathieu.., what do u mean in ur simple code (***)
                                                  ^^^^^ ???

> reader->SetDirectoryName( 
> "/DICOM/1.3.46.670589.5.2.14.2198403904.1065781852.599073/1.3.46.670589.5.2.14.2198403904.1065782189.293302/");
> 
> 
When you use :

	SetDirectoryName( "c:/yasser" )

then *every* single file in this particular dir (c:/yasser) will be
appended to the vtkDICOMImageReader. *Thus* if you need something that
has a meaning (for radiologist), you need to order that dir (c:/yasser)
that contains all your DICOM files, in order to subdivide this folder in
smaller ones. Where each one only contains, a particular study and a
particular (sub)serie (see DICOM standard for more info on :
http://medical.nema.org/)

	BTW, if you are sure you only have *one* serie (meaning the study is 
also the same), then you *don't* need to sort that directory.

> did u mean it is the first and last images in the directory and the
> reader should read in between?? ..

[Then all you have to do is choose a *serie* dir (and not the top dir or
  the study dir).]

Does it makes sense ?
mathieu


> 
> --- Mathieu Malaterre <Mathieu.Malaterre at creatis.insa-lyon.fr> wrote:
>  Yasser,
> 
> [Thanks for changing your ML adress ;)]
> 
> Here is a simple C++ code(*) that use SetDirectoryName(). I suggest 
> you use a tool like 'DicomWorks'(**) to sort the file in directories 
> & subdir like this:
> 
> DICOMDIR/ /study /serie
> 
> Then all you have to do is choose a *serie* dir (and not the top dir 
> or the study dir). Also please note that you should remove all 
> 'README' files, only pure DICOM files, otherwise it's not sure to 
> works.
> 
> HTH mathieu
> 
> 
> (*) //--------------------------------------------------- #include 
> "vtkDICOMImageReader.h" #include "vtkImageData.h" #include 
> "vtkStructuredPointsWriter.h"
> 
> int main() { vtkDICOMImageReader *reader = 
> vtkDICOMImageReader::New(); //reader->SetFileName( "foo.dcm" ); 
> reader->SetDirectoryName( "/mnt/esavoir/DICOM/Phantom/Phantom6/" ); 
> reader->SetDirectoryName( 
> "/DICOM/1.3.46.670589.5.2.14.2198403904.1065781852.599073/1.3.46.670589.5.2.14.2198403904.1065782189.293302/");
>  //(***) reader->Update();
> 
> //reader->GetOutput()->Print( std::cout );
> 
> vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
>  writer->SetInput( reader->GetOutput() ); writer->SetFileName( 
> "yasser.vtk" ); writer->Write();
> 
> return 0; } //---------------------------------------------------
> 
> 
> (**) http://www.dicomworks.com/
> 
> 
> 
> _____________________________________________________________ Get 
> free email, free website, free software and free products at
> 
> http://www.uscomputer.net/portal.htm
> 
> - U.S. Computer Corporation -
> 
> - Why shop anywhere else?
> 
> -
> 
> -
> 
> - _______________________________________________ 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://www.vtk.org/mailman/listinfo/vtkusers
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/




More information about the vtkusers mailing list