[ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins
Mihail Isakov
mihail.isakov at googlemail.com
Thu Mar 26 15:30:32 EDT 2015
Hi, just guessing ... and it is also applicable to many other DICOM
read/write questions here ...There are dozens of DICOM media storage
classes (secondary capture, MR, CT, enhanced MR, US and so on ) and
they have different sets of tags, many of them are conditional, it is
very very complicated with DICOM... so complicated that 100% compliant
files are rare .. most likely by default "secondary capture" is taken
and it doesn't have image postion patient and image orientation
patient... Check 0002|0002 (MediaStorageSOPClassUID) and 0008|0016
(SOPClassUID). To set particular IOD something like this can work
(with GDCM, don't know how does it work with ITK metadata dictionary,
i gave it up and did it with pure GDCM for a while)
gdcm::ImageWriter writer;
gdcm::Image & image = writer.GetImage();
gdcm::DataSet & ds = writer.GetFile().GetDataSet();
gdcm::Attribute<0x0008,0x0016, gdcm::VR::UI> asop;
asop.SetValue("1.2.840.10008.5.1.4.1.1.4"); // MR Image IOD Modules
ds.Replace(asop.GetAsDataElement());
without warranty, try to ask GDCM developers and DICOM people
So far GDCM is trying the best to be DICOM correct..
Regards,
Mihail
"1.2.840.10008.1.3.10" , "Basic Directory IOD Modules"
"1.2.840.10008.5.1.4.1.1.1" , "CR Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.1.1" , "Digital X Ray Image IOD Modules" //
DX IOD (see B.5.1.1)
"1.2.840.10008.5.1.4.1.1.1.1.1" , "Digital X Ray Image IOD Modules" //
DX IOD (see B.5.1.1)
"1.2.840.10008.5.1.4.1.1.1.2" , "Digital Mammography X Ray Image IOD
Modules" // (see B.5.1.2)
"1.2.840.10008.5.1.4.1.1.1.2.1" , "Digital Mammography X Ray Image IOD
Modules"// (see B.5.1.2)
"1.2.840.10008.5.1.4.1.1.1.3" , "Digital Intra Oral X Ray Image IOD
Modules" // (see B.5.1.3)
"1.2.840.10008.5.1.4.1.1.1.3.1" , "Digital Intra Oral X Ray Image IOD
Modules" // (see B.5.1.3)
"1.2.840.10008.5.1.4.1.1.2" , "CT Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.2.1" , "Enhanced CT Image IOD Modules" // (see B.5.1.7)
"1.2.840.10008.5.1.4.1.1.3.1" , "US Multi Frame Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.4" , "MR Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.4.1" , "Enhanced MR Image IOD Modules" // (see B.5.1.6)
"1.2.840.10008.5.1.4.1.1.4.2" , "MR Spectroscopy IOD Modules"
"1.2.840.10008.5.1.4.1.1.4.3" , "Enhanced MR Color Image"
"1.2.840.10008.5.1.4.1.1.6.1" , "US Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.6.2" , "Enhanced US Volume"
"1.2.840.10008.5.1.4.1.1.7" , "SC Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.7.1" , "Multi Frame Single Bit SC Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.7.2" , "Multi Frame Grayscale Byte SC Image
IOD Modules"
"1.2.840.10008.5.1.4.1.1.7.3" , "Multi Frame Grayscale Word SC Image
IOD Modules"
"1.2.840.10008.5.1.4.1.1.7.4" , "Multi Frame True Color SC Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.1.1" , "12 Lead ECG IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.1.2" , "General ECG IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.1.3" , "Ambulatory ECG IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.2.1" , "Hemodynamic IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.3.1" , "Basic Cardiac EP IOD Modules" //
Cardiac Electrophysiology Waveform
"1.2.840.10008.5.1.4.1.1.9.4.1" , "Basic Voice Audio IOD Modules"
"1.2.840.10008.5.1.4.1.1.9.4.2" , "General Audio Waveform"
"1.2.840.10008.5.1.4.1.1.9.5.1" , "Arterial Pulse Waveform"
"1.2.840.10008.5.1.4.1.1.9.6.1" , "Respiratory Waveform"
"1.2.840.10008.5.1.4.1.1.11.1" , "Grayscale Softcopy Presentation
State IOD Modules"
"1.2.840.10008.5.1.4.1.1.11.2" , "Color Softcopy Presentation State"
"1.2.840.10008.5.1.4.1.1.11.3" , "Pseudo-Color Softcopy Presentation State"
"1.2.840.10008.5.1.4.1.1.11.4" , "Blending Softcopy Presentation State"
"1.2.840.10008.5.1.4.1.1.11.5" , "IOD defined in PS 3.3"
"1.2.840.10008.5.1.4.1.1.12.1" , "X Ray Angiographic Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.12.1.1" , "Enhanced X Ray Angiographic Image
IOD Modules"
"1.2.840.10008.5.1.4.1.1.12.2" , "XRF Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.12.2.1" , "Enhanced X Ray RF Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.13.1.1" , "X Ray 3D Angiographic Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.13.1.2" , "X-Ray 3D Craniofacial Image"
"1.2.840.10008.5.1.4.1.1.13.1.3" , "IOD defined in PS 3.3"
"1.2.840.10008.5.1.4.1.1.20" , "NM Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.66" , "Raw Data IOD Modules"
"1.2.840.10008.5.1.4.1.1.66.1" , "Spatial Registration IOD Modules"
"1.2.840.10008.5.1.4.1.1.66.2" , "Spatial Fiducials IOD Modules"
"1.2.840.10008.5.1.4.1.1.66.3" , "Deformable Spatial Registration"
"1.2.840.10008.5.1.4.1.1.66.4" , "Segmentation IOD Modules"
"1.2.840.10008.5.1.4.1.1.66.5" , "Surface Segmentation"
"1.2.840.10008.5.1.4.1.1.67" , "Real World Value Mapping"
"1.2.840.10008.5.1.4.1.1.77.1.1" , "VL Endoscopic Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.77.1.1.1" , "Video Endoscopic Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.77.1.2" , "VL Microscopic Image"
"1.2.840.10008.5.1.4.1.1.77.1.2.1" , "Video Microscopic Image"
"1.2.840.10008.5.1.4.1.1.77.1.3" , "VL Slide-Coordinates Microscopic Image"
"1.2.840.10008.5.1.4.1.1.77.1.4" , "VL Photographic Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.77.1.4.1" , "Video Photographic Image"
"1.2.840.10008.5.1.4.1.1.77.1.5.1" , "Ophthalmic Photography 8 Bit Image"
"1.2.840.10008.5.1.4.1.1.77.1.5.2" , "Ophthalmic Photography 16 Bit Image"
"1.2.840.10008.5.1.4.1.1.77.1.5.3" , "Stereometric Relationship"
"1.2.840.10008.5.1.4.1.1.77.1.5.4" , "Ophthalmic Tomography Image"
"1.2.840.10008.5.1.4.1.1.78.1" , "Lensometry Measurements"
"1.2.840.10008.5.1.4.1.1.78.2" , "Autorefraction Measurements"
"1.2.840.10008.5.1.4.1.1.78.3" , "Keratometry Measurements"
"1.2.840.10008.5.1.4.1.1.78.4" , "Subjective Refraction Measurements"
"1.2.840.10008.5.1.4.1.1.78.5" , "Visual Acuity Measurements"
"1.2.840.10008.5.1.4.1.1.78.6" , "Spectacle Prescription Report"
"1.2.840.10008.5.1.4.1.1.79.1" , "Macular Grid Thickness and Volume Report"
"1.2.840.10008.5.1.4.1.1.88.11" , "Basic Text SR IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.22" , "Enhanced SR IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.33" , "Comprehensive SR IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.40" , "Procedure Log"
"1.2.840.10008.5.1.4.1.1.88.50" , "Mammography CAD SR IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.59" , "Key Object Selection Document IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.65" , "Chest CAD SR IOD"
"1.2.840.10008.5.1.4.1.1.88.67" , "X Ray Radiation Dose SR IOD Modules"
"1.2.840.10008.5.1.4.1.1.88.69" , "Colon CAD SR IOD"
"1.2.840.10008.5.1.4.1.1.104.1" , "Encapsulated PDF IOD Modules"
"1.2.840.10008.5.1.4.1.1.104.2" , "Encapsulated CDA IOD Modules"
"1.2.840.10008.5.1.4.1.1.128" , "PET Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.130" , "IOD defined in PS 3.3"
"1.2.840.10008.5.1.4.1.1.131" , "Basic Structured Display IOD"
"1.2.840.10008.5.1.4.1.1.481.1" , "RT Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.2" , "RT Dose IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.3" , "RT Structure Set IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.4" , "RT Beams Treatment Record IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.5" , "RT Plan IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.6" , "RT Brachy Treatment Record IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.7" , "RT Treatment Summary Record IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.8" , "RT Ion Plan IOD Modules"
"1.2.840.10008.5.1.4.1.1.481.9" , "RT Ion Beams Treatment Record IOD Modules"
"1.2.840.10008.5.1.4.38.1" , "Hanging Protocol IOD Modules"
"1.2.840.10008.5.1.4.39.1" , "Color Palette IOD"
// Deprecated:
"1.2.840.10008.3.1.2.3.3" , "Modality Performed Procedure Step IOD Modules"
"1.2.840.10008.5.1.4.1.1.5" , "NM Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.6" , "US Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.3" , "US Multi Frame Image IOD Modules"
"1.2.840.10008.5.1.4.1.1.12.3" , "" // XRayAngiographicBiplaneImageStorage
// private:
"1.3.12.2.1107.5.9.1" , "Siemens Non-image IOD Modules" // CSA
Non-Image Storage
On Thu, Mar 26, 2015 at 2:38 PM, Matias Montroull <matimontg at gmail.com> wrote:
> Hi Brad, I just created a JIRA issue:
> https://issues.itk.org/jira/browse/SIMPLEITK-627
> Regards,
> Matias.
>
> On Thu, Mar 26, 2015 at 10:12 AM, Bradley Lowekamp <blowekamp at mail.nih.gov>
> wrote:
>>
>> Hello,
>>
>> Can you please create a JIRA ticket to track this issue?
>>
>> https://issues.itk.org/jira/browse/SIMPLEITK
>>
>> Thank you,
>> Brad
>>
>> On Mar 25, 2015, at 6:17 PM, Matias Montroull <matimontg at gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta
>> > and for some reason it's not copying the Image Position Patient information
>> > when writing the slices.
>> >
>> > any ideas why this happens?
>> >
>> > Here's my code:
>> > ImageFileReader imgreader_resultado = new ImageFileReader();
>> > imgreader_resultado.SetFileName(path_pacientes +
>> > nombre_paciente + @"\Fusion\" + "resultado.mha");
>> > itk.simple.Image imgresultado =
>> > imgreader_resultado.Execute();
>> > ImageSeriesWriter SeriesWriter_resultado = new
>> > ImageSeriesWriter();
>> > VectorString vs_resultado = new VectorString();
>> > for (int i = 0; i < imgresultado.GetSize()[2]; ++i)
>> > {
>> > vs_resultado.Add(path_pacientes + nombre_paciente +
>> > @"\Fusion\Resultado\" + "imagen" + i + ".dcm");
>> > }
>> >
>> > SeriesWriter_resultado.SetFileNames(vs_resultado);
>> >
>> > if (!Directory.Exists(path_pacientes + nombre_paciente +
>> > @"\Fusion\Resultado")) //Si se abrió el plan y nunca se hizo registración
>> > previamente, se crea el directorio Registración
>> > {
>> > Directory.CreateDirectory(path_pacientes +
>> > nombre_paciente + @"\Fusion\Resultado");
>> > }
>> >
>> > SeriesWriter_resultado.Execute(imgresultado, vs_resultado,
>> > false);
>> >
>> > Thank you,
>> >
>> > Matias.
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.php
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/insight-users
>>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list