Closed flaviu22 closed 3 years ago
The vtkNIFTIHeader class is documented on this web page: http://dgobbi.github.io/vtk-dicom/doc/api/classvtk_n_i_f_t_i_header.html
The meanings of the fields are described in the nifti documentation: https://nifti.nimh.nih.gov/nifti-1/documentation/
For the window, use GetCalMin() and GetCalMax(). WindowCenter = (cal_min + cal_max)/2.0 WindowWidth = cal_max - cal_min However, please note that in many nifti files, the cal_max and cal_min will be zero!
The best way to get the orientation of a nifti file is via the quaternion parameters. The nifti documentation at the NIH website describes how to do this. There are also some notes in the vtkNIFTIReader source code: https://github.com/dgobbi/vtk-dicom/blob/master/Source/vtkNIFTIReader.cxx#L714
David, thank you for your valuable information. However, I think is about more information than that, for instance, from vtkDICOMReader I could find a lot info:
vtkDICOMMetaData* pMeta = pDICOMReader->GetMetaData();
pMeta->GetAttributeValue(DC::InstitutionName).AsString().c_str());
pMeta->GetAttributeValue(DC::PatientName).AsString().c_str());
pMeta->GetAttributeValue(DC::PatientBirthName).AsString().c_str());
pMeta->GetAttributeValue(DC::PatientID).AsString().c_str());
pMeta->GetAttributeValue(DC::PatientSex).AsString().c_str());
Could I have the same things from vtkNIFTIReader ? If I can, how ?
It is more a question, but because I didn't see any message menu, I write here: how can I get metadata from vtkNIFTIReader ?
I successfully did from vtkDICOMReader:
well, how can I do it for vtkNIFTIReader ?
I have tried:
vtkNIFTIHeader* pNIFTIHeader = m_pNIFTIReader->GetNIFTIHeader();
but I don't know how to proceed further ... and I didn't see anything appropiate here of on PDF help page. Can you lead me into solve this ? I really need this feature.