I agree with Akshay. You should get familiar with Matlab's Image Processing Toolbox first.
There are many functions that work on 3D images, so you should also be more specific. Which type(format) the 3D images are? Which kind of images are? Which functions do you really need? Once you convert from 2D to 3D, what do you want to do later? keep on working on matlab (save them as .mat would be enough) or load the images in another tool? As you see, there are a lot of questions you must better define to get the advises you really need.
I work daily with 3D medical images in different formats: DICOM, nifti, or mhd, for example. Therefore, I know what I am talking about. These image formats are very different and consequently the way the information is loaded/saved differs from one to each other. So there is no a solely function that can deal with all of them.
For the case of converting the image to 3D is again what I told you, what do you want to do after with the converted 3D image? If you want to keep on working on Matlab is so simple as stack all your 2D images in a 3D matrix.
What you are asking is very broad and general. Giving more details would help to give more detailed answers.
This function will allow you to read the content of a DICOM set and load it in a matlab variable.
X = dicomread(filename)
Once your DICOM set is loaded in X you will have a M by N by NumSlices Matrix, so that you can access to any 2D slice by taking the M by N matrix you want.
2DSlice = X(:,:,sliceNumber);
DISPLAY DICOM Images.
Here you have several options. One of them is to show the slice you have previously extracted (i.e. 2DSlice) as in the normal matlab way.
Other option is to create your GUI with sliders and plots objects that show all the slices through your DICOM set. If you google a little bit you will find many DICOM toolboxes Matlab based. You can take the one that better fits your needs.
Thanks for the help with the answers, I have a different query. I have stacked a number of 2D DICOM images. How can I show them as a 3D image? I am so new in this that I am not sure about the terminologies I am using, hope you've understood.