Conversion of .jpg files into DICOM in MRI images

I have three different folders containing .jpg images of three different views of a shoulder MRI (axial, coronal, sagittal). How can I convert them into DICOM format? Additionally, if I upload the sequences as they are, 3D Slicer treats all the folders as axial views and does not differentiate them. How can I change this? How can I upload everything as a single volume?

If you only have jpg then you will have trouble working in 3D. You’ll need to figure out the geometry that has already been thrown away by the conversion. You should really get original dicom images that contain the scan parameters needed to reconstruct.

So, is it not possible to set in 3D Slicer what type of view I am considering? Also, to check if it treats the slices as a 3D volume, do I need dimensions of NxNxN?

If you are reading the data from jpg then the orientation and spacing information is lost and you need to reconstruct it manually to map it back to patient space. The needed transforms are described here:

https://slicer.readthedocs.io/en/latest/user_guide/coordinate_systems.html

One way to do this is to save the volume in into a nrrd file and then edit the header to fill in the missing data.

https://teem.sourceforge.net/nrrd/format.html