Basic Commands OHIF v3


I have some basic questions, if anyone can help me, I’m happy!

I would like to hide some buttons according to modality. It makes no sense to display the reference line, MPR and other functions for modalities that do not support them.

Is there any command that returns the modality or UID series opened before and after opening a study?

what is the command to reset every time you open the image size and voi?

where is the best place to put this command?

Does anyone have an extension to download a study?

Best Regards

Modality and UID info can be found in Tag data

You can get Tag data by these ways:

const dataSet = imageLoader.loadAndCacheImage(imageId).then(image => {

const imageInfo = { 
	modality: dataSet.string("x00080060"), // Modality’s tag is x00080060
	studyInstanceUID: dataSet.string("x0020000D"), // UID’s tag is x0020000D

You can also get image data in this way:
const image = cornerstone.getImage(enabledElement);

  1. dicomParser library
function getImageInfoByFile(file) { 
  return new Promise((resolve) => { 
    const reader = new FileReader(); 
    reader.onload = function () { 
      const arrayBuffer = reader.result as ArrayBuffer;
      const byteArray = new Uint8Array(arrayBuffer); 
      const dataSet = dicomParser.parseDicom(byteArray); 
      const imageInfo = getImageInfoByDataSet(dataSet); 
  1. cornerstone.getMetaData()