[Insight-users] How to sort DICOM slices by Patients Name
Luis Ibanez
luis . ibanez at kitware . com
Fri, 26 Sep 2003 16:13:05 -0400
Hi Thimmaiah,
Right now the DICOM parser is not parsing the patient
name nor the patient ID.
You could add these tags to the file
Insight/Utilities/DICOMParser/DICOMAppHelper.cxx
for example in line 180 you could add
> {0x0010, 0x0010, DICOMParser::VR_PN, "Patient name"},
You could then follow the example of the method
void DICOMAppHelper
::GetSliceNumberFilenamePairs(
dicomstd::vector<dicomstd::pair<int, dicomstd::string> >& v)
in line 984 of the same file, for creating a similar method
that gets the pairing of filenames and patient name.
Once you have this method in the DICOMAppHelper, you can
use it from the file
Insight/Code/IO/itkDICOMSeriesFileNames.cxx
for selecting the files corresponding to the same patient.
You may want to get some coffee first.... :-)
----
If you plan to do this just once and it is not part of a
task that you anticipate to perform continuously, you can
simply solve your immediate problem by using MRIConvert.
You can download it for free from Jolinda Smith's page
http://lcni . uoregon . edu/~jolinda/MRIConvert
It will allow you to save the datasets in MetaImage,
Analyze and BrainVoyager formats.
Regards,
Luis
----------------------------
Thimmaiah, Sandhya wrote:
> Hi,
> I have a directory of DICOM images which has MRI images of 3 patients. I
> wanted to know if there is a way I can sort them according to patients or if
> I can just get one patients images. Thank you
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>