[Gate-users] NEMA image quality phantom

Marc Chamberland MarcChamberland at cmail.carleton.ca
Fri Jun 28 18:50:39 CEST 2013


Hi Bassim,

The type of volume you want is called a G4Tubs in Geant4. Unfortunately, Geant4 apparently only handles volume sources that are either spheres, ellipsoids, cylinders or parallelepipeds. This can be seen in G4SPSPosDistribution.cc:

void G4SPSPosDistribution::GeneratePointsInVolume()
{
  G4ThreeVector RandPos;
  G4double tempx, tempy, tempz;
  G4double x, y, z;
  x = y = z = 0.;
  if(SourcePosType != "Volume" && verbosityLevel >= 1)
    G4cout << "Error SourcePosType not Volume" << G4endl;
  //Private method to create points in a volume
  if(Shape == "Sphere")
    {
      x = Radius*2.;
      y = Radius*2.;
      z = Radius*2.;
      while(((x*x)+(y*y)+(z*z)) > (Radius*Radius))
	{
	  x = posRndm->GenRandX();
	  y = posRndm->GenRandY();
	  z = posRndm->GenRandZ();

	  x = (x*2.*Radius) - Radius;
	  y = (y*2.*Radius) - Radius;
	  z = (z*2.*Radius) - Radius;
	}
    }
  else if(Shape == "Ellipsoid")
    {
      G4double temp;
      temp = 100.;
      while(temp > 1.)
	{
	  x = posRndm->GenRandX();
	  y = posRndm->GenRandY();
	  z = posRndm->GenRandZ();

	  x = (x*2.*halfx) - halfx;
	  y = (y*2.*halfy) - halfy;
	  z = (z*2.*halfz) - halfz;
	  
	  temp = ((x*x)/(halfx*halfx)) + ((y*y)/(halfy*halfy))
	    + ((z*z)/(halfz*halfz));
	}
    }
  else if(Shape == "Cylinder")
    {
      x = Radius*2.;
      y = Radius*2.;
      while(((x*x)+(y*y)) > (Radius*Radius))
	{
	  x = posRndm->GenRandX();
	  y = posRndm->GenRandY();
	  z = posRndm->GenRandZ();

	  x = (x*2.*Radius) - Radius;
	  y = (y*2.*Radius) - Radius;
	  z = (z*2.*halfz) - halfz;
	}
    }
  else if(Shape == "Para")
    {
      x = posRndm->GenRandX();
      y = posRndm->GenRandY();
      z = posRndm->GenRandZ();
      x = (x*2.*halfx) - halfx;
      y = (y*2.*halfy) - halfy;
      z = (z*2.*halfz) - halfz;
      x = x + z*std::tan(ParTheta)*std::cos(ParPhi) + y*std::tan(ParAlpha);
      y = y + z*std::tan(ParTheta)*std::sin(ParPhi);
      // z = z;
    }
  else
    G4cout << "Error: Volume Shape Doesnt Exist" << G4endl;


One solution would be to add support for a G4Tubs in this function. Then, you would also need to add support for this shape to the Gate code for creating a source.

Of course, maybe someone else has already added this functionality to Gate. Hopefully, they will share with the community!

Marc



__________________________

Marc Chamberland, MSc
PhD candidate
Department of Physics
Carleton University
Ottawa (ON)

On 2013-06-28, at 12:14 PM, bassim aklan <bassim.aklan at imp.uni-erlangen.de>
 wrote:

> Hallo Gate users,
> 
> I'm trying to simulate the NEMA IQ phantom in Gatev6.1. I was trying to set the background activity inside the body phantom,
> but there seems to be no way to set the 
> source with the shape of half(or quarter)-circle cylinder
>  as is the case with the phantom
> geometry. 
> If there are anyone who have tried the NEMA IQ test, I would be very glad to tell me how do this in Gatte.
> 
> Thank you for your support,
> Bassim
> 
> -- 
> Bassim Aklan, MSc.
> Institute of Medical Physics - Section for MR Imaging
> University of Erlangen-Nuremberg
> Henkestr. 91
> 91052 Erlangen, Germany
> phone: +49-(0)9131/85-25545 
> 
> bassim.aklan at imp.uni-erlangen.de
> 
>  
> 
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users




More information about the Gate-users mailing list