I am new to Slicer and am trying to construct a 3d volume from an image stack (jpeg or png). The application is in materials science. The spacing between the images in the stack are not the same.
If you read the image stack from DICOM then Slicer can create a grid (displacement field) transform that places each slice in their correct location. You can then harden the transform on the volume to create a uniformly spaced volume.
If you cannot get the input in DICOM format then you can adapt the AcquisitionModeling class of the DICOM reader to create the appropriate transform.