Volume of a 'cylinder with rounded sides' I need to find the volume of a torus-shaped object, but it which doesn't have space between the ring. 
We can find the volume of the ring, but what about the inner part?
PS: What is that shape called?
EDIT:
I've edited the title. What I mean, is a Cylinder, with rounded sides.
 A: Let $S$ be our shape. The picture below (made with Pov-Ray) illustrates $S$. It is the intersection of a torus (red) with a cylinder (blue, half-transparent).

Furthermore, let $h$ be its height and $r$ be the radius at the top (so the radius at the middle is $r+h$) (see image below, made with Paint :$).

Now we call the radius at a given height $x$ the function $R(x)$ (where $x$ goes from $x=-\frac12h$, bottom, to $x=\frac12h$, top. See the graph above. $x$ is on the x-axis). Luckily the shape of a circle is easy, so we can compute $R(x)$ by $$R(x)=r+\sqrt{\tfrac14h^2-x^2}$$
So now we can calculate the volume by rotating $R(x)$ around the x-axis (see this wikipedia article for more information about revolving an area between a curve and the x-axis):
\begin{align}\pi\int_{-h/2}^{h/2}R(x)^2
&=\pi\int_{-h/2}^{h/2}\left(r+\sqrt{\tfrac14h^2-x^2}\right)^2dx\\
&=\pi\int_{-h/2}^{h/2}\left(r^2+2r\sqrt{\tfrac14h^2-x^2}+\sqrt{\tfrac14h^2-x^2}^2\right)dx\\
&=\pi\left(\int_{-h/2}^{h/2}r^2dx+2r\int_{-h/2}^{h/2}\sqrt{\tfrac14h^2-x^2}dx+\int_{-h/2}^{h/2}|\tfrac14h^2-x^2|dx\right)\\
&=\pi\left(hr^2+2r(\tfrac12\pi\cdot \tfrac14h^2)+\int_{-h/2}^{h/2}\tfrac14h^2dx-\int_{-h/2}^{h/2}x^2dx\right)\\
&=\pi\left(hr^2+\tfrac14r\pi h^2+\tfrac14h^3-[\tfrac13x^3]_{-h/2}^{h/2}\right)\\
&=\pi\left(hr^2+\tfrac14r\pi h^2+\tfrac14h^3-\tfrac1{12}h^3\right)\\
&=h\pi\left(r^2+\tfrac14r\pi h+\tfrac16h^2\right)\\
\end{align}
A: Perhaps you are referring to the outer positive ( Gauss) curvature part of an anchor ring of following cross-section. There are two parts in it.

For rounded outer part Pappu's theorem is beneficial for estimating volumes of revolution.(case $b=0 $). But you should know the center of gravity of area before finding volume of rotated part.
Let us use the theorem to find position of area center of gravity of semi-circle at first.
$$ 2 \pi c \cdot \pi a^2/2 = 4 \pi a^3/3 $$
$$ c= \dfrac{4a}{3 \pi} $$
This wont change even when whole thing is pulled out radially $( b>0)$.
So, the volume of round part = $( \pi a^2/2) \cdot  \color{red}{2 \pi}\cdot( b+c)   $
EDIT1 : 
( My earlier error of omission $ 2\pi $ )
Volume of central disk or cylinder = $ \pi b^2 ( 2a) $
Find total volume adding above two.  
$$ \color{red} {V_{total} =  \dfrac43 \pi a^3 + \pi a b ( \pi a + 2 b )} $$
A: It appears that both of the previous answers are in agreement at this point, but unfortunately neither gives a method that readily lends itself to doing similar problems. That is, the are ad hoc solutions that solve only the one problem. A more general approach is to apply Pappus's ($2^{nd}$) Centroid Theorem: the volume of a planar area of revolution is the product of the area A and the length of the path traced by its centroid R, i.e., $2\pi R$.
Now, the centroid of a composite area is the weighted sum of the component centroids. Using subscripts r and c for the rectangular and circular parts, we have
$$R=\frac{A_rb/2+A_c(b+4a/3\pi)}{A}$$
where $A_c=2br$ and $Ac=\pi a^2/2$. Then, by Pappus's theorem
$$V=2\pi RA=2\pi \left[A_r\frac{b}{2}+A_c\left(b+\frac{4a}{3\pi}\right)\right]=\dfrac43 \pi a^3 + \pi a b ( \pi a + 2 b )$$
which is seen to be the same as @Narasimham. As a parity check, you can verify that
$$\pi b^2 2a<V<\pi (b+a)^2 2a$$
For your next challenge, find the volume of the disk or radius b with a half-torus cut out of it, as in railroad wheel.
A: Seems like what you're looking for might be the volume of a Superegg which is a made by rotating a superellipse about it's central axis. The equation for a superellipse is: $$ \left|\frac{x}{a} \right|^n + \left| \frac{y}{b} \right|^n = 1. $$ For the kind of shape you're looking for, I would think you want an $n$ of 2 or greater (also called a "hyperellipse" or a "squircle") which generates a shape like this:

Rotating this about it's central axis would create just the shape you're looking for.
