15 Replies Latest reply on Jan 12, 2012 5:39 PM by Semaphoric

    Scaling to a specific scale

    exrocker64

      Importing DICOM images, converted to .tifs    Need to overlay them and size to scale to be able to overlay multiple images

       

      Is there a simple way to measure the scale and input that measurement in the other image somewhere to get it re-size to scale so I can drag it into the other image and overlay them?

       

      Content aware scale isn't the issue. I need to specify a scale numerically and have it snap to that scale somehow.

       

      Photoshop CS4 OR Illustrator CS4

        • 1. Re: Scaling to a specific scale
          JJMack Most Valuable Participant

          More imformation is needed about the image files will they all have the same asoect ratio.  Photoshop shipts with a script that will load images into a stack for you look at menu File>Scripts>Load Files into Stack.  You can scale/transform layers to overlay layers below. All image will need to have the same aspect ratio else some parts will not be overlayed.

          • 2. Re: Scaling to a specific scale
            Semaphoric Adobe Community Professional

            Are the images differnt sizes? Do you have identifiable landmarks (at least two) in each image? If you have Photoshop Extended, you could use the Ruler tool to measure the distance between the two landmarks in each image. Then, using Analysis > Record Measurements, you can then export the measurements to a text file.

             

            You could then copy the lengths, and use use some external program (Windows has a calculator; I assume Mac does too) to divide the two lengths to find the relative percentages, and then paste this into Image Size or Transform, and scale one to match the other. There may be a more direct way to get the length values, but you can't copy from th Info panel (someone, please show me that you can!).

             

            You could make a script that would automate this. I'm not a scripting maven, but if the scripting language can do basic arithmetic, you wouldn't need the external calculator. Maybe you could even do it without the external text file as well.

            • 3. Re: Scaling to a specific scale
              c.pfaffenbichler Level 8

              I think I read recently that the Ruler Tool is not accessible to Scripting, but a workaround with the Pen Tool to create two-point-paths for example seems possible.

               

              exrocker64, (as usual) providing a few screenshots or lores images might help make the procedure clearer.

              • 4. Re: Scaling to a specific scale
                exrocker64 Level 1

                thanks for the response.  i tried what you mention but i still have to

                manually transform each image to align with the scale and then align

                with each other.  what i was hoping for was a way to measure with the

                ruler on the scale, tell it how big the scale is, and have it resize the

                images automatically.  that way when i stack i would only have to align

                them.  i see how to set the scale of an image so i can measure parts of

                the image accurately but don't see how to get that to resize images so

                they can be compared.  these are ct images and all have a scale but have

                been cropped so they're all effectively different scales when i stack. 

                thanks for any help!

                • 5. Re: Scaling to a specific scale
                  c.pfaffenbichler Level 8

                  The alinging could also be (semi-)automated.

                  Please post a couple of examples (in lores).

                  • 6. Re: Scaling to a specific scale
                    exrocker64 Level 1

                    that response was to JJMack  and I also attached a photo for an example

                    as requested by another person

                     

                    the explanation is in my previous reply

                     

                    thanks so much for any help

                    • 7. Re: Scaling to a specific scale
                      Semaphoric Adobe Community Professional

                      It would be a lot easier to do this with the uncropped versions, if they have a scale on them, and crop AfFTER combining them.

                      • 8. Re: Scaling to a specific scale
                        exrocker64 Level 1

                        in response to the other question, can't get them uncropped - this is

                        the way they come

                        • 9. Re: Scaling to a specific scale
                          exrocker64 Level 1

                          how do I upload images for examples?

                          • 10. Re: Scaling to a specific scale
                            JJMack Most Valuable Participant

                            As I wrote more information is needed about what you are trying to do and most of all about the images your trying to align.  If all images were not taken from the same spot at the same focal length even if you scale objects to have the same pixel size they will not align.   If Images were just croped without resampling you would not need to scale them just align the areas that are in common. If  some images wrere resampled as well as cropped the quality of the interpolation may make automated alignment all but imposible.

                            • 11. Re: Scaling to a specific scale
                              Semaphoric Adobe Community Professional

                              Since these are from DICOM images, which is a medical imaging format, they were likely done from CT scans -- no lens, hence no focal length. Position and scale are another matter. If the original DICOMs were available, they would (from the tiny bit I read after a search) likely have all the information necessary included as part of the file to do this automaticallys. From cropped TIFFs, looks like actual work is in order.

                               

                              exrocker, do you have PS Extended? Without it, it may even be necessary to jot down values on paper

                              • 12. Re: Scaling to a specific scale
                                c.pfaffenbichler Level 8

                                I also attached a photo for an example

                                as requested by another person

                                You need to post the images from the browser with the Insert Image-button.

                                cameraIconInsertImage.jpg

                                • 13. Re: Scaling to a specific scale
                                  JJMack Most Valuable Participant

                                  I did nout understand what DICOM images are.  I would think stacking these images would be commonly done. Like a sliced loaf of bread.  Therefore I would do a google search. I would guess the odiginal dicom files would be needed there is most likely metadata that would be very helpful  in automating this process. http://xmedcon.sourceforge.net/Faq/Stack

                                  • 14. Re: Scaling to a specific scale
                                    Paul Riggott Level 6

                                    Do you think this might be of use? ....

                                     

                                    http://forums.adobe.com/message/2560886

                                    • 15. Re: Scaling to a specific scale
                                      Semaphoric Adobe Community Professional

                                      I was just looking over the Scripting reference, and it looks like you can indeed use the Ruler tool in scripting. You would use the recordMeasurements method, with MEASURERULERTOOL  as a parameter. It puts the results into a string array, I would suppose in the same format as the Measurement Log you get with Analysis > Record Measurements.