[vtkusers] Re: DCMTK question

Luca Pamparana luca.pamparana at gmail.com
Mon Jun 4 18:55:05 EDT 2007


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.

Yeah, DICOM is annoying. However, it is the scanner vendors that are
annoying :)

Luca

On 6/4/07, Mark Wyszomierski <markww at gmail.com> wrote:
>
> I thought you could use findAndGetOFString() plus the element offset
> your interested in and everything will get parsed for you
> automatically. I think it was pretty much made for these tag
> situations (like IOP, IPP, pixel spacing, etc).
>
> This DICOM stuff is annoying.
>
> Mark
>
> On 6/4/07, Luca Pamparana <luca.pamparana at gmail.com> wrote:
> > Hi everyone,
> >
> > This tag cannot be read as an array. I did not know that each value had
> to
> > be read in seperately. It is sorted now.
> >
> > Float64 rowxCos = 0.0;
> > m_dcmFileFormat->getDataset()->findAndGetFloat64(
> > >                 DCM_ImageOrientationPatient, rowxCos);
> >
> > Float64 rowyCos = 0.0;
> > m_dcmFileFormat->getDataset()->findAndGetFloat64(
> > >                 DCM_ImageOrientationPatient, rowyCos);
> >
> > and so on...
> >
> > Thanks,
> > Luca
> >
> >
> >
> > So, I had to do..
> >
> > On 6/4/07, Luca Pamparana < luca.pamparana at gmail.com> wrote:
> > > Hello,
> > >
> > > I know this is not the best forum for this and I apologize for
> positing
> > here. However, since many people here have experience with DCMTK, I was
> > wondering if someone could help me.
> > >
> > > I am trying to read the DCM_ImageOrientationPatient tag (0020, 0037).
> > >
> > > I have the following code which should get the pointer to the value
> > arrays:
> > >
> > >
> > > const Float32 * data = 0;
> > > retval =
> > m_dcmFileFormat->getDataset()->findAndGetFloat32Array(
> > >                 DCM_ImageOrientationPatient, data).good();
> > >
> > > m_dcmFileFormat = DcmFileFormat object pointer.
> > >
> > > I have tried it with float and double array types but the method
> always
> > returns false.
> > >
> > > If someone can help me find what I am doing wrong, I will be much
> > grateful.
> > >
> > > Thank you,
> > >
> > > Luca
> > >
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070604/c5998263/attachment.htm>


More information about the vtkusers mailing list