Yeah, I think the better way is with this reading each element seperately. This way you do not have to parse anything and no need to worry about conversion from string to float or anything.<br><br>Yeah, DICOM is annoying. However, it is the scanner vendors that are annoying :)
<br><br>Luca<br><br><div><span class="gmail_quote">On 6/4/07, <b class="gmail_sendername">Mark Wyszomierski</b> <<a href="mailto:markww@gmail.com">markww@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I thought you could use findAndGetOFString() plus the element offset<br>your interested in and everything will get parsed for you<br>automatically. I think it was pretty much made for these tag<br>situations (like IOP, IPP, pixel spacing, etc).
<br><br>This DICOM stuff is annoying.<br><br>Mark<br><br>On 6/4/07, Luca Pamparana <<a href="mailto:luca.pamparana@gmail.com">luca.pamparana@gmail.com</a>> wrote:<br>> Hi everyone,<br>><br>> This tag cannot be read as an array. I did not know that each value had to
<br>> be read in seperately. It is sorted now.<br>><br>> Float64 rowxCos = 0.0;<br>> m_dcmFileFormat->getDataset()->findAndGetFloat64(<br>> > DCM_ImageOrientationPatient, rowxCos);<br>
><br>> Float64 rowyCos = 0.0;<br>> m_dcmFileFormat->getDataset()->findAndGetFloat64(<br>> > DCM_ImageOrientationPatient, rowyCos);<br>><br>> and so on...<br>><br>> Thanks,<br>
> Luca<br>><br>><br>><br>> So, I had to do..<br>><br>> On 6/4/07, Luca Pamparana < <a href="mailto:luca.pamparana@gmail.com">luca.pamparana@gmail.com</a>> wrote:<br>> > Hello,<br>> >
<br>> > I know this is not the best forum for this and I apologize for positing<br>> here. However, since many people here have experience with DCMTK, I was<br>> wondering if someone could help me.<br>> >
<br>> > I am trying to read the DCM_ImageOrientationPatient tag (0020, 0037).<br>> ><br>> > I have the following code which should get the pointer to the value<br>> arrays:<br>> ><br>> ><br>
> > const Float32 * data = 0;<br>> > retval =<br>> m_dcmFileFormat->getDataset()->findAndGetFloat32Array(<br>> > DCM_ImageOrientationPatient, data).good();<br>> ><br>> > m_dcmFileFormat = DcmFileFormat object pointer.
<br>> ><br>> > I have tried it with float and double array types but the method always<br>> returns false.<br>> ><br>> > If someone can help me find what I am doing wrong, I will be much<br>> grateful.
<br>> ><br>> > Thank you,<br>> ><br>> > Luca<br>> ><br>><br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at:
<br>> <a href="http://www.vtk.org/Wiki/VTK_FAQ">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">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br>><br>><br></blockquote></div><br>