How to use "vtkMedicalImageProperties.h" functions in visual studio with QT C++

Hello everybody,
I would like to use “vtkMedicalImageProperties.h” functions to get the information of DICOM, but have no idea to use the function.
Is there any example or format that I can understand how to make it working.

For example:
How to get patient name?
below is the part of code from “vtkMedicalImageProperties.h”

class VTKIOIMAGE_EXPORT vtkMedicalImageProperties : public vtkObject
{
public:
static vtkMedicalImageProperties* New();
vtkTypeMacro(vtkMedicalImageProperties, vtkObject);
void PrintSelf(ostream& os, vtkIndent indent) override;
/**

  • Convenience method to reset all fields to an empty string/value
    */
    virtual void Clear();

///@{
/**

  • Patient name
  • For ex: DICOM (0010,0010) = DOE,JOHN
    */
    vtkSetStringMacro(PatientName);
    vtkGetStringMacro(PatientName);
    ///@}

    }

Thanks

I would recommend to use vtk-dicom. It works much better than the old DICOM classes in VTK core.

Thank you, I will try it.

Sorry about that, I still cannot understand how to use vtk-dicom to show the information of DICOM, I also read the exampes.
What the function seems like?
Thanks
I type like below.

vtkSmartPointer<vtkDICOMReader> reader = vtkSmartPointer<vtkDICOMReader>::New();
	reader->UpdateInformation();
	vtkDICOMMetaData *meta = reader->GetMetaData();
	vtkDICOMValue vw = meta->Get(DC::WindowWidth);
	ui->labelManufacturer->setText(vw.AsString);

or like this

vtkSmartPointer<vtkDICOMReader> metaReader = vtkSmartPointer<vtkDICOMReader>::New();
	metaReader->UpdateInformation();
	vtkDICOMMetaData *meta = metaReader->GetMetaData();
	ui->labelManufacturer->setText(QString::fromStdString(meta->GetAttributeValue(DC::Manufacturer).AsString()));