Giter VIP home page Giter VIP logo

Comments (3)

KrisThielemans avatar KrisThielemans commented on August 15, 2024

I'm confused by this. I didn't think STIR was able to read GATE interfile headers, but you seem to imply it does. Nevertheless, its interpretation of the location is very wrong.

I don't know what GATE does for the output (does it centre it or do you specify where the output has to be in GATE coordinates)? Is it guaranteed to be aligned with the GATE_Atten_input? (only then would the work-around work, but I wouldn't recommend it anyway, as really stir_math should have complained very loudly about adding images with different location, please create a STIR issue on that...).

By the way, can't we ask GATE to write something else then Interfile, even if it's only as an option or for checking?

from stir-gate-connection.

robbietuk avatar robbietuk commented on August 15, 2024

I'm confused by this. I didn't think STIR was able to read GATE interfile headers, but you seem to imply it does. Nevertheless, its interpretation of the location is very wrong.

STIR can read the GATE interfile headers with ITK installed, hence that whole palaver (UCL/STIR#654 and UCL/STIR#531).


I don't know what GATE does for the output (does it centre it or do you specify where the output has to be in GATE coordinates)?

The outputs are the sourcemaps and the mu-maps. The mu-maps are the attenuation map used by GATE in the simulation. There is no additional specification the the output position in GATE coordinates than

/gate/source/SourcePhantom/setPosition {SourcePositionX} {SourcePositionY} {SourcePositionZ} mm
and
/gate/VoxPhantom/placement/setTranslation {AttenuationTranslationX} {AttenuationTranslationY} {AttenuationTranslationZ} mm

This is unrelated to

## Get the activity source position in x,y,z
SourcePositions=$( SubScripts/GetSourcePosition.sh $ActivityFilename 2>/dev/null )
SourcePositionX=`echo ${SourcePositions} |awk '{print $1}'`
SourcePositionY=`echo ${SourcePositions} |awk '{print $2}'`
SourcePositionZ=`echo ${SourcePositions} |awk '{print $3}'`
if [ $? -ne 0 ]; then
echo "Error in SubScripts/GetSourcePosition.sh"
exit 1
fi
## Get the attenuation map translation in x,y,z
AttenuationTranslations=$( SubScripts/GetAttenuationTranslation.sh $AttenuationFilename 2>/dev/null )
AttenuationTranslationX=`echo ${AttenuationTranslations} |awk '{print $1}'`
AttenuationTranslationY=`echo ${AttenuationTranslations} |awk '{print $2}'`
AttenuationTranslationZ=`echo ${AttenuationTranslations} |awk '{print $3}'`
if [ $? -ne 0 ]; then
echo "Error in SubScripts/GetAttenuationTranslation.sh"
exit 1
fi

I forced these values to be 0 and the resulting output is the same. Outputing these images as .mhd (the interfile alternative) gives the same non-zero origin that is expected with list_image_info. Assume ITK and STIR are reading these files correctly to get the origin, meaning it is a GATE issue?


Is it guaranteed to be aligned with the GATE_Atten_input? (only then would the work-around work, but I wouldn't recommend it anyway, as really stir_math should have complained very loudly about adding images with different location, please create a STIR issue on that...).

There is an issue, I forgot to link it in the original post UCL/STIR#494 . The work around does allign the GATE output with GATE_Atten_input but I guess that is by exploting a bug. Probably shouldn't incorporate bugs into features 😄.

from stir-gate-connection.

KrisThielemans avatar KrisThielemans commented on August 15, 2024

I'm too confused about this and have no time anyway (sorry), but I doubt ITK reads interfile. https://itk.org/Wiki/ITK/File_Formats If it does, it certainly won't return correct origin etc as Interfile doesn't define this.

would be worth posting the mhd header that it outputs. if it doesn't depend on the position etc (while the image remains the same), it would certainly be a GATE bug

from stir-gate-connection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.