I noticed that some literatures said they developed a Monte Carlo simulator of computed tomography(CT) based on geant4 toolkit, but they didn’t open the source code. How can I build up a CT scanner? I am familair with x-ray radiography simulation through geant4, but only single angle imaging. For CT scanner, it needs multi-angle scanning, and the X-ray tube and detectors or the inspected object is required to rotate. How to make the machine rotate to get multi-angles scanning in geant4? By the way, is there any examples?
I also have the same purpose as you.
I created a application to get single angle image from the Cone Beam CT. To get full rotated images, I think we should implement multi runs. Between 2 runs, we will rotate the phantom/source+detector geometry. But I don’t still implement this ideal yet. I hope that there is anyone can help us in this post.
yeah, you are right. For CT imaging one often need 900 views (projections), so if we rotate the object/source+detectors is not a practical method.
I found opengate can simulate CT. Opengate is developed from geant4, and can be defined by user commands.While I still want to build up a program by myself through geant4 since geant4 is based on c++ and can store output into ROOT format file.
GATE is also a tool that will help us build a CT simulation easily via macro lines. I tried GATE before. If you need my source code, I can share it with you.
Thanks for your kindness. I will find you when I need the source code of GATE.We can keep in touch in the future.
Hi @HungBuiTien, I am a student who wants to model a CT scanner now. If you don’t mind, can you share the GATE code of the CT scanner?? I would be very grateful if you could share.
Its more easyer to achieve by rotating the phantom rather than souce + detectors.
Hello, please I’m very new to geant4, could you show me how?
May I ask how to make the object rotate around a specific
aixs in geant4? Can you share your experiences or some useful codes?
Hi, @ repan
In my work, I use these commands:
G4Tubs* parPhantom =
new G4Tubs(“outPhan”, 0, 0.5outDia, 0.5outLen, 0, CLHEP::twopi); // define a cylinder parPhanLV =
new G4LogicalVolume(parPhantom, matResin, “outPhanLV”);
G4RotationMatrix* pRot = new G4RotationMatrix();
**pRot->rotateZ(m_angledeg);** // Here m_angle is the object ratation angle, Its value can be passed form main(), the argv variable
pos = G4ThreeVector(0,0,0); //move back to world center
new G4PVPlacement(pRot,pos,parPhanLV,“parPhanPhysics”,worldLV, false,0,fCheckOverlaps);
parPhanLV->SetVisAttributes(new G4VisAttributes(G4Color(0.8275, 0.8275, 0.8275))); // grey
Thanks for your reply. I think your message is helpful for others. I can understand your strategy. But there are still some puzzles remind. Can you clarify how to pass the rotational angle
DetectorConstruction class? And how do you execute the program to loop over angles?